I am referring this
<http://blog.trifork.com/2012/01/22/query-time-joining-in-lucene/>link for
usage of query time join and I am able to use following method
createJoinQuery(String fromField, boolean multipleValuesPerDocument,
String toField, Query fromQuery, IndexSearcher fromSearcher, ScoreMode
scoreMode)
Parameters:
fromField - The from field to join from
multipleValuesPerDocument - Whether the from field has multiple terms per
document
toField - The to field to join to
fromQuery - The query to match documents on the from side
fromSearcher - The searcher that executed the specified fromQuery
scoreMode - Instructs how scores from the fromQuery are mapped to the
returned query
However I would like to use following createJoinQuery() with different
parameters
public static Query createJoinQuery(String joinField,Query fromQuery,
Query toQuery,IndexSearcher searcher,ScoreMode scoreMode,
MultiDocValues.OrdinalMap ordinalMap) throws IOException
joinField - The SortedDocValues field containing the join values
fromQuery - The query containing the actual user query. Also the fromQuery
can only match "from" documents.
toQuery - The query identifying all documents on the "to" side.
searcher - The index searcher used to execute the from query
scoreMode - Instructs how scores from the fromQuery are mapped to the
returned query
ordinalMap - The ordinal map constructed over the joinField. In case of a
single segment index, no ordinal map needs to be provided.
For this methods, I am referring this
<https://lucene.apache.org/core/5_3_0/join/org/apache/lucene/search/join/JoinUtil.html>link.
I don't have any clue for the parameter ordinalMap and how to create it. It
will be great help if any one explains it with example.
Best Regards,
*Pravin Thokal*
*Senior Product Engineer,*
*SysTools Software Pvt. Ltd.*
202, Pentagon P3, Magarpatta CyberCity, Pune - 411028 , Maharashtra, India.
+91-02-60505558 | www.systoolsgroup.com | www.mailxaminer.com