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 thturk <ta...@hotmail.com> on 2018/08/15 13:44:26 UTC
Improve Search Speed
Hey i am new in Lucene and i want to search indexes in *100 *ms;
FileSize is* 2gb* and indexes are seperated via some type( 6 files ) and
there are *20m records* in file
i set searcher and reader in the constructor
and i have boolean query which include fuzzy query and wildcard query.
everything is fine and working but
*int resultSize = 100;
TopDocs results = searcher.search(boolQuery, resultSize);
for (ScoreDoc docTemp : results.scoreDocs) {
Document doc = searcher.doc(docTemp.doc);
addresses.add(helper.fillFields(_doc));
}*
Here is my code and there are records more than resultSize but when I
increase this number search takes longer but the documents which I am
looking for can be in another part of same index. It's because of ordering
as I understand the documents with same Score order by some field but that
order is not returning me correct result .
Or can I increase my search performance?
--
Sent from: http://lucene.472066.n3.nabble.com/Lucene-Java-Users-f532864.html
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
RE: Improve Search Speed
Posted by thturk <ta...@hotmail.com>.
Thank you for your advice as i researched many people suggest me same things
like making better complex queries to get more spesific results .
but i didnt excatly get what is more spesifc queries . More indexed fields
and put many different kind of boolean queries in it mostly i am using
fuzzy queries but its also not returning me good results is the keyword is
longer or shorter than index its not maching.
--
Sent from: http://lucene.472066.n3.nabble.com/Lucene-Java-Users-f532864.html
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
RE: Improve Search Speed
Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,
In general, the speed of the Lucene search depends on several aspects, one of those is of course the underlying hardware its IO performance. To improve search performance, one way is to use SSDs or increase the available file system cache of your operating system. Full text search engines are fast, because they only return the best-ranking results first (by using priority queues). Further increasing the result window size will slow down searches. So try to improve the relevancy by using better or more specific queries and apply filters instead of increasing the result set size. To do this we, need more information about the type of documents or queries you are using.
Uwe
-----
Uwe Schindler
Achterdiek 19, D-28357 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de
> -----Original Message-----
> From: thturk <ta...@hotmail.com>
> Sent: Wednesday, August 15, 2018 3:44 PM
> To: java-user@lucene.apache.org
> Subject: Improve Search Speed
>
> Hey i am new in Lucene and i want to search indexes in *100 *ms;
> FileSize is* 2gb* and indexes are seperated via some type( 6 files ) and
> there are *20m records* in file
> i set searcher and reader in the constructor
>
> and i have boolean query which include fuzzy query and wildcard query.
>
> everything is fine and working but
>
>
> *int resultSize = 100;
> TopDocs results = searcher.search(boolQuery, resultSize);
>
> for (ScoreDoc docTemp : results.scoreDocs) {
> Document doc = searcher.doc(docTemp.doc);
> addresses.add(helper.fillFields(_doc));
> }*
> Here is my code and there are records more than resultSize but when I
> increase this number search takes longer but the documents which I am
> looking for can be in another part of same index. It's because of ordering
> as I understand the documents with same Score order by some field but that
> order is not returning me correct result .
>
> Or can I increase my search performance?
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Lucene-Java-Users-
> f532864.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org