Re: Tracking that all query terms are matched in one document

2017-12-04 Thread Vadim Gindin
For example like this: BooleanQuery.Builder expected = new BooleanQuery.Builder(); Query param_vendor = new BoostQuery(new ConstantScoreQuery(new TermQuery(new Term("param_vendor", queryStr))), 5f); Query param_model = new BoostQuery(new ConstantScoreQuery(new TermQuery(new Term("param_model", qu

Re: Tracking that all query terms are matched in one document

2017-12-04 Thread Michael Sokolov
Well how did you make the original query? On Dec 4, 2017 12:05 PM, "Vadim Gindin" wrote: > Yes, thanks. My question is exactly about how to create "another extra > query that requires all the terms in the original query" > > On Mon, Dec 4, 2017 at 6:50 PM, Michael Sokolov > wrote: > > > I'm jus

Encryption At Rest - Using CustomAnalyzer

2017-12-04 Thread aravinth thangasami
Hi all, To support Encryption at Rest, We have written a custom analyzer, that encrypts every token in the Input string and proceeds to the default indexing chain We are using AES/CTR/NoPadding with unique Key Per User. This helps that the input string with common prefix, the encrypted strings wi

Re: Tracking that all query terms are matched in one document

2017-12-04 Thread Vadim Gindin
Yes, thanks. My question is exactly about how to create "another extra query that requires all the terms in the original query" On Mon, Dec 4, 2017 at 6:50 PM, Michael Sokolov wrote: > I'm just saying, that when you form your query, you could also create > another extra query that requires all t

Re: How to regulate native memory?

2017-12-04 Thread Dominique Bejean
Hi Uwe, When you are saying "MMap is NOT direct memory", I understand that we can consider that JVM can use (at least) these 3 types of memory: - Heap memory (controlled by Xmx and managed by GC) - Off-heap MMap (os cache) *which is not* Direct Memory and *is not* controlled by MaxDirect

Re: Tracking that all query terms are matched in one document

2017-12-04 Thread Michael Sokolov
I'm just saying, that when you form your query, you could also create another extra query that requires all the terms in the original query, and then combine it with the original query in a boolean where the original query is required and the extra query is optional. That will give a boost when all

Re: how to compile lucene 4.10.4 using jdk7

2017-12-04 Thread Adrien Grand
I suspect you are not using the version you think you are using at compile time, this error message suggests that you are actually compiling with Java 9. See this email thread which has a bit more information about this issue: http://mail-archives.apache.org/mod_mbox/lucene-dev/201503.mbox/%3C07c40

Re: Scorer.iterator() - how to implement correctly

2017-12-04 Thread Vadim Gindin
Adrien, you're right. I've checked it again - it starts working. Probably, I had an error in my index causing wrong behavior or yes misusing API. Here is my code BooleanQuery.Builder expected = new BooleanQuery.Builder(); Query param_vendor = new BoostQuery(new ConstantScoreQuery(new TermQuery(ne

Re: Tracking that all query terms are matched in one document

2017-12-04 Thread Vadim Gindin
Thanks, Michael! Yes, I'm sure. Could you explain your proposal in more detail? Regards, Vadim Gindin On Mon, Dec 4, 2017 at 3:18 PM, Michael Sokolov wrote: > You could combine a Boolean and query with the same terms, as an optional > clause. Are you sure about the requirement to multiply the

Re: Tracking that all query terms are matched in one document

2017-12-04 Thread Michael Sokolov
You could combine a Boolean and query with the same terms, as an optional clause. Are you sure about the requirement to multiply the score in that case? On Dec 4, 2017 5:13 AM, "Vadim Gindin" wrote: > Hi all. > > I need to track that all query terms are matched in one document. When all > terms

Re: Scorer.iterator() - how to implement correctly

2017-12-04 Thread Adrien Grand
It is correct... but ConstantScoreQuery is the way to go with your use-case. It should not return scores of 0 unless you are misusing the API in some way. Please share the code that you use in order to build your query. Le lun. 4 déc. 2017 à 11:10, Vadim Gindin a écrit : > Adrien. > > I've found

Re: Tracking that all query terms are matched in one document

2017-12-04 Thread Vadim Gindin
Sorry I've accidentally sent an unfinished letter ). Could somebody advise me the way how to implement the following thing? Regards Vadim Gindin On Mon, Dec 4, 2017 at 3:12 PM, Vadim Gindin wrote: > Hi all. > > I need to track that all query terms are matched in one document. When all > terms

Tracking that all query terms are matched in one document

2017-12-04 Thread Vadim Gindin
Hi all. I need to track that all query terms are matched in one document. When all terms are matched I need to multiply the score of such document to some constant coefficient.

Re: Scorer.iterator() - how to implement correctly

2017-12-04 Thread Vadim Gindin
Adrien. I've found some working solution. Here is how it calculates iterator: this.iterator = context.reader().postings(query.getTerm(), PostingsEnum.ALL); if (this.iterator == null) this.iterator = DocIdSetIterator.empty(); Is that implementation correct? On Sun, Dec 3, 2017 at 4:43 PM, Vadim

Re: Ring geospatial query

2017-12-04 Thread Adrien Grand
We don't have such a query, but there are workarounds. - If you need this feature for pagination, you should instead use IndexSearcher.searchAfter with a LatLonPointSortField. - If your documents have a single geo-point, you could build a boolean query with a distance query or the outer radius a

Ring geospatial query

2017-12-04 Thread sp
Hello, Does lucene java api have a way to do a ring geospatial query around a LatLonPoint and return the results sorted by distance? By ring, I mean points which lie beyond an inner radius and within an outer radius Any suggestions are greatly appreciated. Thanks -- Sent from: http://lucene.47