-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more scoring methods; book_author and editor; and constant() me…
…thod
- Loading branch information
1 parent
6820d0e
commit 64b0e4e
Showing
6 changed files
with
90 additions
and
20 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
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 |
---|---|---|
|
@@ -155,6 +155,7 @@ public void test() throws Exception { | |
*/ | ||
", \"bibstem\": [\"JNuM\", \"JNuM..455\"]" + | ||
", \"body\": \"Some fulltext hashimoto added\"" + | ||
", \"book_author\": [\"book, author\", \"book, fauthor\"]" + | ||
", \"caption\": [\"caption1 captionFoo\", \"caption2\"]" + | ||
", \"citation\": [\"2014JNuM..455...10C\", \"2014JNuM..455...10D\"]" + | ||
", \"cite_read_boost\": 0.52" + | ||
|
@@ -164,18 +165,19 @@ public void test() throws Exception { | |
", \"comment\": [\"comment1 commentFoo\", \"comment2\"]" + | ||
", \"database\": [\"ASTRONOMY\", \"PHYSICS\"]" + | ||
|
||
", \"data\": [\"NED:15\", \"CDS:5\"]" + | ||
", \"data_count\": 20" + | ||
", \"data\": [\"NED:15\", \"CDS:5\"]" + | ||
", \"data_count\": 20" + | ||
// it is solr format for the pubdate, must be in the right format | ||
// we need to add 30 minutes to every day; this allows us to search | ||
// for ranges effectively; thus: | ||
// 2013-08-5 -> 2013-08-05T00:30:00Z | ||
// 2013-08 -> 2013-08-01T00:30:00Z | ||
// 2013 -> 2013-01-01T00:30:00Z | ||
", \"date\": \"2013-08-05T00:30:00Z\"" + | ||
", \"date\": \"2013-08-05T00:30:00Z\"" + | ||
", \"doctype\": \"article\"" + | ||
", \"doctype_facet_hier\": [\"0/Article\", \"1/Article/Book chapter\"]" + | ||
", \"doi\": \"doi:ŽŠČŘĎŤŇ:123456789\"" + | ||
", \"editor\": [\"t' Hooft, van X\"]" + | ||
", \"eid\": \"00001\"" + | ||
", \"email\": [\"-\", \"[email protected]\", \"-\"]" + | ||
// entry_date --> see below | ||
|
@@ -345,14 +347,14 @@ public void test() throws Exception { | |
|
||
|
||
/* | ||
* caption | ||
*/ | ||
assertQ(req("q", "caption:caption1"), | ||
"//*[@numFound='1']", | ||
"//doc/int[@name='recid'][.='100']"); | ||
assertQ(req("q", "caption:captionfoo"), | ||
"//*[@numFound='1']", | ||
"//doc/int[@name='recid'][.='100']"); | ||
* caption | ||
*/ | ||
assertQ(req("q", "caption:caption1"), | ||
"//*[@numFound='1']", | ||
"//doc/int[@name='recid'][.='100']"); | ||
assertQ(req("q", "caption:captionfoo"), | ||
"//*[@numFound='1']", | ||
"//doc/int[@name='recid'][.='100']"); | ||
|
||
|
||
/* | ||
|
@@ -399,6 +401,13 @@ public void test() throws Exception { | |
"<str>Anders, John Michael</str>" + | ||
"<str>Einstein, A</str></arr>"); | ||
|
||
/* | ||
* book_author | ||
*/ | ||
assertQ(req("q", "book_author:\"book, fauthor\""), | ||
"//*[@numFound='1']", | ||
"//doc/int[@name='recid'][.='100']"); | ||
|
||
/* | ||
* author_count | ||
*/ | ||
|
@@ -477,6 +486,13 @@ public void test() throws Exception { | |
); | ||
|
||
|
||
/* | ||
* editor | ||
*/ | ||
assertQ(req("q", "editor:\"'t hooft, v x\""), | ||
"//*[@numFound='1']", | ||
"//doc/int[@name='recid'][.='100']"); | ||
|
||
|
||
/* | ||
|
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