lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Sokolov <msoko...@gmail.com>
Subject Re: fields contains equals term docs search
Date Mon, 22 Apr 2019 14:32:00 GMT
Can you create a scoring scenario that counts the number of fields in
which a term occurs and rank by that (descending) with some kind of
post-filtering?

On Fri, Apr 19, 2019 at 11:24 AM Valentin Popov <valentin.po@gmail.com> wrote:
>
> Hi,
> I trying find the way, to search all docs has equals term on different
> fields. Like
>
> doc1 {"foo":"master", "bar":"master"}
> doc2 {"foo":"test", "bar":"master"}
>
> As result should be doc1 only.
>
> Right now, I'm get all terms for "foo", "bar" intersect it and get all
> terms could be both "foo", "bar"
> and after make huge query with all intersected items:
>
> Query query
> (String item: Intersection<String>) {
>     query.addBoolean({"foo": item, "bar": item})
> }
>
> Is any better way to find all doc's that has intersected terms?
>
> Thanks!
> --
> Regards,
> Valentin.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message