lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "JavaTech ." <>
Subject Lucene linking/joining or AND operation on multiple documents
Date Tue, 25 Apr 2017 06:00:09 GMT
Hi All,

I am beginner in lucene . I will come to matter first, actually We are
planning to use lucene as search engine for our application. We will have
to manage many type of search queries like combination of OR and AND with
multiple docs.

Currently I am stuck in one search query, it need to have combination of
multiple queries.

we store some mail information into lucene as by number documents. One mail
can have 5-6 docs . Added below a sample structure of data,

1) "id": "1","sendr_name": "*sender1*", "recip_name": "*recipient1*",
"subject": "*subject1*"
2) "id": "1","attachment": "*attachment1*"
3) "id": "1","domain": "*domain1*", "ip": "ip1"
5) "id": "1","mid": "*mid1*"
6) "id": "1","type": "type1"

7) "id": "2","sendr_name": "sender1", "recip_name": "recipient1",
"subject": "subject1"
8) "id": "2","attachment": "attachment2"
9) "id": "2","domain": "domain1", "ip": "ip2"
10) "id": "2","mid": "mid2"
11) "id": "2","type": "type2"

12) "id": "3","sendr_name": "sender1", "recip_name": "recipient3",
"subject": "subject3"
13) "id": "3","attachment": "attachment3"
14) "id": "3","domain": "domain1", "ip": "ip3"
15) "id": "3","mid": "mid3"
16) "id": "3","type": "type3"

*Note :* serial no. 1-16 are documents for different mails and field "*id*"
get generated internally , so id value cannot use as query value by user.

My need is to extract one mail or some mail info as by querying like

+sendr_name:sender1 + recip_name:recipient1 +subject:subject1
+attachment:attachment1 +domain:domain1 +mid:mid1

This is to get mail 1 info(1-6 docs for mail 1) . But above query fails to
return result because attachment, mid and domain in different docs. Is
there any way that we can span AND condition to multiple docs? or is there
anyway that we can join query on a field like = I request
you all to provide your suggestions or help to solve this issue.



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message