lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Newton <>
Subject Question about JoinUtil
Date Thu, 11 Dec 2014 19:53:04 GMT
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, from left, join, right where
left.type="fooType" and right.type="barType" and
and and"Fred*" and"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?  :-)


public static Query createJoinQuery(String fromField,
                    boolean multipleValuesPerDocument,
                    String toField,
                    Query fromQuery,
                    IndexSearcher fromSearcher,
                    ScoreMode scoreMode)
                             throws IOException

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message