You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by NDelt <bl...@gmail.com> on 2019/01/25 10:55:58 UTC
Question about Indexsearcher.search()
Hello.
I'm trying to make sample search application with Lucene.
search() method of IndexSearcher class searches documents with given query,
and returns TopDocs instance. TopDocs instance has array of ScoreDoc
instances.
My question is:
1. Will query be tokenized during search?
2. If so, does ScoreDoc instance have only one token's hit for term?
Re: Question about Indexsearcher.search()
Posted by Tomoko Uchida <to...@gmail.com>.
Hi,
Tokenization is usually performed by a query parser before searching
and the result documents may include all terms or some of the terms or
only one term in the query string (it depends on your query
configuration).
> I'm trying to make sample search application with Lucene.
Have you checked the demo package? SearchFiles class might be helpful.
http://lucene.apache.org/core/7_6_0/demo/overview-summary.html
2019年1月25日(金) 19:56 NDelt <bl...@gmail.com>:
>
> Hello.
> I'm trying to make sample search application with Lucene.
>
> search() method of IndexSearcher class searches documents with given query,
> and returns TopDocs instance. TopDocs instance has array of ScoreDoc
> instances.
>
> My question is:
> 1. Will query be tokenized during search?
> 2. If so, does ScoreDoc instance have only one token's hit for term?
--
Tomoko Uchida
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org