Thanks a lot Eric.

Thanks and Regards
Aniruddh

On Fri, Jun 10, 2016 at 12:25 PM, Erick Erickson <erickerick...@gmail.com>
wrote:

> Usually people put an application layer between the Business User and
> the actual query to form complex Solr queries that "do the right
> thing". Unfortunately there's no good automated ways to do this that I
> know of as each app has its own set of peculiarities.
>
> Best,
> Erick
>
> On Wed, Jun 8, 2016 at 2:28 PM, Aniruddh Sharma <asharma...@gmail.com>
> wrote:
> > Hi Eric
> >
> > Thanks for prompt response. The reason for not flattening in given format
> > was (this I used as example for a very simple data structure). But in
> > actual my record has 100 of fields like this with different nesting
> inside.
> >
> > and once I ingest data in Solr , then Business User will make a search
> > rather than a IT person and Business User needs to have some simple
> mapping
> > to understand new field schema on which they can query.
> >
> > As its end goal is to be used by Business User , and my input record has
> > multiple parameters of nesting. How can I deal with this situation.
> >
> > Thanks and Regards
> > Aniruddh
> >
> > On Wed, Jun 8, 2016 at 5:20 PM, Erick Erickson <erickerick...@gmail.com>
> > wrote:
> >
> >> Why not just flatten this? I.e. have fields
> >> prev_temp
> >> day_temp
> >> next_temp
> >> prev_humidity
> >> day_humitidy
> >> next_humidity
> >> ?
> >>
> >> If you use multiValued fields, there's no good way to
> >> express
> >> prev_temp=X AND prev_humidity=Y
> >> because they'd both be in a single MV field called "temp"
> >> and "humidity"
> >> so querying
> >> temp=X and humidity=Y could match
> >> the previous day's temp and the next day's humidity.
> >>
> >> Best,
> >> Erick
> >>
> >> On Wed, Jun 8, 2016 at 1:52 PM, Aniruddh Sharma <asharma...@gmail.com>
> >> wrote:
> >> > Hi Susheel
> >> >
> >> > Thanks for prompt response.
> >> >
> >> > I have a further query on it.  Wouldn't above mentioned approach be
> >> > appropriate if I am either getting PreviousDay or CurrentDay.
> >> >
> >> > In my case I will sometimes be getting both PreviousDay and
> CurrentDay in
> >> > same record. so when I store temp/humidity as multi-valued it wouldn't
> >> know
> >> > whether I have stored for previousDay or currentDay.
> >> >
> >> > Kindly guide me if I misunderstand.
> >> >
> >> > Thanks and Regards
> >> > Aniruddh
> >> >
> >> > On Wed, Jun 8, 2016 at 4:41 PM, Susheel Kumar <susheel2...@gmail.com>
> >> wrote:
> >> >
> >> >> How about creating schema with temperature, humidity & a day field
> (and
> >> >> other fields you may have like zipcode/city/country etc). Put
> >> day="next" or
> >> >> day="previous" and during query use fq (filter query) to have
> >> >> fq=day:previous or fq=day:next.
> >> >>
> >> >> Thanks,
> >> >> Susheel
> >> >>
> >> >> On Wed, Jun 8, 2016 at 2:46 PM, Aniruddh Sharma <
> asharma...@gmail.com>
> >> >> wrote:
> >> >>
> >> >> > Hi
> >> >> >
> >> >> > Request help
> >> >> >
> >> >> > I have following XML data to start with
> >> >> >
> >> >> > <Weather>
> >> >> >    <previousDay>
> >> >> >       <temperature>13</temp>
> >> >> >       <humidity>50</humidity>
> >> >> >     </previousDay>
> >> >> >    <nextDay>
> >> >> >       <temperature>15</temp>
> >> >> >       <humidity>60</humidity>
> >> >> >     </nextDay>
> >> >> > </Weather>
> >> >> >
> >> >> >
> >> >> > Please notice it has "previousDay" and "nextDay" and both of them
> >> >> contains
> >> >> > details of same field "temperature" and "humidity"
> >> >> >
> >> >> > What is best way to create schema for it , where I could query for
> >> >> > temperature on previousDay as well as on currentDay
> >> >> >
> >> >> >
> >> >> >
> >> >> > Thanks and Regards
> >> >> > Aniruddh
> >> >> >
> >> >>
> >>
>

Reply via email to