lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Newton <glen.new...@gmail.com>
Subject Re: Question about JoinUtil
Date Tue, 16 Dec 2014 15:46:53 GMT
Anyone?

On Thu, Dec 11, 2014 at 2:53 PM, Glen Newton <glen.newton@gmail.com> wrote:
> Is there any reason JoinUtil (below) does not have a 'Query toQuery'
> available? I was wanting to filter on the 'to' side as well. I feel I
> am missing something here.
>
> To make sure this is not an XY problem, here is my use case:
>
> I have a many-to-many relationship. The left, join, and right 'table'
> objects are all indexed in the same lucene index, with a field 'type'
> to distinguish them.
>
> I need to do something like this:
> select left.name, right.country from left, join, right where
> left.type="fooType" and right.type="barType" and join.leftId=left.id
> and join.rightId=right.id and left.name="Fred*" and
> right.country="Ca*"
>
> Is JoinUtil the way to go?
> Or should I roll my own?
>    Or am I indexing/using-Lucene incorrectly, thinking relational when
> a different way to index or query would be better in an idiomatic
> Lucene manner?  :-)
>
>
> Thanks,
> Glen
>
> https://lucene.apache.org/core/4_10_2/join/org/apache/lucene/search/join/JoinUtil.html
>
> public static Query createJoinQuery(String fromField,
>                     boolean multipleValuesPerDocument,
>                     String toField,
>                     Query fromQuery,
>                     IndexSearcher fromSearcher,
>                     ScoreMode scoreMode)
>                              throws IOException

---------------------------------------------------------------------
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