Closed khui closed 7 years ago
Hi Kai,
Thanks for your question. Such questions can also be posted on the Forum (http://terrier.org/forum/). The current semantics of Terrier is that it operates like a filter for fields, proximities etc. See http://terrier.org/docs/current/querylanguage.html
The semantics are changing for Terrier 5. However, its not ready for public consumption yet ;-)
Craig
Got it, thank you @cmacdonald.
Kai
Hi,
I am using v4.2 in my Java application. This is a question rather than a bug report since I haven't digged deeply into the code. Any hints would be appreciated.
I issued field query as follows:
BODY:(term1 term2 term3 .. )
(also tried:BODY:term1 BODY:term2 ....
) and the returned ResultSet includes 0 documents. If I issued the same query without field, namely, term1 term2..., reasonable search results are returned. The query parsetrees (fromsrq.getQuery().parseTree()
) and some logs are as follows.former:
MultiTermQuery(FieldQuery(SingleTermQuery(term1)),FieldQuery(SingleTermQuery(term2)),FieldQuery(SingleTermQuery(term3)))
logs:
latter:
MultiTermQuery(SingleTermQuery(term1),SingleTermQuery(term2),SingleTermQuery(term3))
logs:
I also tried with single term query for both and got similar results.
Moreover, I also examined
index.getCollectionStatistics().getNumberOfFields()
, as well as the index property file, and both included/recorded the correct fields.I would like to ask whether I missed some important configuration? Or there might be sth wrong with my index.