lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jayan <>
Subject AND operation on multiple documents in lucene
Date Sun, 23 Apr 2017 20:25:10 GMT
I am new into lucene. Currently I am stuck in one query search
implementation, we store some mail information into lucene as by number
documents. One mail can have 5-6 docs . Added below a sample structure of

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":
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.

View this message in context:
Sent from the Lucene - Java Users mailing list archive at

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

View raw message