forked from laurensdv/SIREn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
127 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ out/ | |
|
||
# Other | ||
bin/ | ||
siren-solr/src/test/resources/solr.home/data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -263,4 +263,40 @@ public void testASCIIFoldingExpansion() throws IOException, SolrServerException | |
Assert.assertTrue("id2 should get higher score than id1", score1 < score2); | ||
} | ||
|
||
@Test | ||
public void testMailto() throws IOException, SolrServerException { | ||
this.addNTripleString("id1", "<http://s> <http://p> <mailto:[email protected]> ."); | ||
SolrQuery query = new SolrQuery(); | ||
query.setQuery("mailto:[email protected]"); | ||
query.setQueryType("siren"); | ||
|
||
String[] results = wrapper.search(query, "url"); | ||
assertEquals(1, results.length); | ||
|
||
query = new SolrQuery(); | ||
query.setQuery("[email protected]"); | ||
query.setQueryType("siren"); | ||
|
||
results = wrapper.search(query, "url"); | ||
assertEquals(1, results.length); | ||
} | ||
|
||
@Test | ||
public void testTildeInURI() throws IOException, SolrServerException { | ||
this.addNTripleString("id1", "<http://s> <http://p> <http://sw.deri.org/~aidanh/> ."); | ||
SolrQuery query = new SolrQuery(); | ||
query.setQuery("http://sw.deri.org/~aidanh/"); | ||
query.setQueryType("siren"); | ||
|
||
String[] results = wrapper.search(query, "url"); | ||
assertEquals(1, results.length); | ||
|
||
query = new SolrQuery(); | ||
query.setQuery("http://sw.deri.org/~aidanh"); | ||
query.setQueryType("siren"); | ||
|
||
results = wrapper.search(query, "url"); | ||
assertEquals(1, results.length); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters