lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohit Anchlia <mohitanch...@gmail.com>
Subject Searching accross 2 fields
Date Mon, 21 May 2012 18:36:38 GMT
I am new to search and just went through some concepts of "Lucene in
Action". I have few questions:

Problem I am having is this. Say I have these json docs for eg. Now I want
to query forms.id = 40 and fields.id = L31A and fields.value = 3000. I
expect it to return doc 1. But with the regular search I'll also get doc 2.
What's the best way of designing search for such queries?

Json doc 1
{
   "fileName":"filename",
   "createdDate":"05/20/12 16:21:56",
   "setModel":[
      {
         "id":"1",
         "compliance":false,
         "forms":[
            {
               "id":"40",
               "copy":null,
               "tpsId":null,
               "forms":[
                  {
                     "id":"F40_SW_2",
                     "copy":null,
                     "tpsId":"1[]/F40[]",
                     "forms":[
                     ],
                     "tables":[
                     ],
                     "fields":[
                        {
                           "id":"L31A",
                           "security":null,
                           "value":"3000."
                        },
                        {
                           "id":"MRSSN1",
                           "security":null,
                           "value":"656465464"
                        }
                     ]
                  }
                ]
             }
}


Json doc 2
{
   "fileName":"filename",
   "createdDate":"05/20/12 16:21:56",
   "setModel":[
      {
         "id":"1",
         "compliance":false,
         "forms":[
            {
               "id":"50",
               "copy":null,
               "tpsId":null,
               "forms":[
                  {
                     "id":"F50_SW_2",
                     "copy":null,
                     "tpsId":"1[]/F50[]",
                     "forms":[
                     ],
                     "tables":[
                     ],
                     "fields":[
                        {
                           "id":"L31A",
                           "security":null,
                           "value":"3000."
                        },
                        {
                           "id":"MRSSN1",
                           "security":null,
                           "value":"656465464"
                        }
                     ]
                  }
                ]
             }

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