lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: multi-valued associated fields
Date Wed, 12 May 2010 14:12:49 GMT
I'm not entirely sure this is germane, but there's absolutely no requirement
that
all documents in SOLR have the same fields. So it's possible for you to
index
the "wildly different content" in "wildly different fields" <G>. Then
searching for
screen:LCD would be straightforward. Of course this may not map into your
problem space at all well, but I thought I'd mention it.

There's nothing in SOLR that I know of that understands KEY:VALUE pairs in
a multi-valued field. However, you could do some trick like prefix your key,
so you'd
effectively be indexing screenLCD and screenTFT, but that's kind of awkward
if your
values have multiple words, although you could still prefix each word (e.g.
to index a screen with the value "really big one", you'd have to index
screenreally, screenbig, screenone or some such).

And have you looked at dynamic fields? Again I'm not sure that works for
you, but
might be worth a look.

Best
Erick

On Wed, May 12, 2010 at 4:17 AM, Eric Grobler <impalaherd@googlemail.com>wrote:

> Hi Aditya,
>
> Thanks for your response.
> Yes, a category type would be needed.
>
> One thing I am not clear about,
> If you have multi-values like "toshiba, tecra, LCD"
> it is then clear that you can run solr queries like:
>  fq=mymultivaluefield:LCD
>
> but for associated fields like:
>  "make=toshiba, model=tecra, screen=LCD"
>  "make=toshiba, model=tecra, screen=TFT"
> Is there a way for Solr to understand key=value pairs from a multi-value
> field?
> For example you may want to do a filter on screen type:
>  fq=mymultivaluefield:screen
> and not
>  fq=mymultivaluefield:screen:LCD
>
>
>
> On Wed, May 12, 2010 at 8:20 AM, findbestopensource <
> findbestopensource@gmail.com> wrote:
>
> > Hello Eric,
> >
> > Certainly it is possible. I would strongly advice to have field which
> > differentiates the record type (RECORD_TYPE:"CAR" / "PROPERTY").
> >
> > >>In general I was also wondering how Solr developers implement websites
> > that
> > uses tag filters.For example, a user clicks on "Hard drives" then get
> tags
> > "External,
> > Internal" then clicks on "External" and gets "usb, firewire" etc.
> > By using faceting queries, You could acheive this.
> >
> > Regards
> > Aditya
> > www.findbestopensource.com
> >
> >
> >
> >
> > On Wed, May 12, 2010 at 12:29 PM, Eric Grobler <
> impalaherd@googlemail.com
> > >wrote:
> >
> > > Hallo Solr community,
> > >
> > > We are considering Solr for searching on content from various partners
> > > with wildly different content.
> > >
> > > Is it possible or practical to work with multi-valued associated fields
> > > like
> > > this?
> > > "Make:Audi, Model:A4, Color:Blue, Year:1998, KM:200000, Extras:GPS"
> > > "Type:Flat, Rooms:2, Period:6 months"
> > > "Make:Toshiba, Model:Tecra, RAM:4GB, Extras:BlueRay;Lock"
> > > "Breed:Siamese, Age:9 weeks"
> > >
> > > and do:
> > > - searching on individual keys
> > > - range queries within multi-valued fields.
> > > - faceting
> > >
> > > I suppose an alternative would be to create unnamed fields like
> > > range1, range2, range3 with a descripter field like
> > >  "Year,KM,EngineSize" for a car document and
> > >  "Rooms" for a property document for example.
> > >
> > > In general I was also wondering how Solr developers implement websites
> > that
> > > uses tag filters.
> > > For example, a user clicks on "Hard drives" then get tags "External,
> > > Internal" then clicks on "External" and gets "usb, firewire" etc.
> > >
> > > Any suggestions and feedback would be greatly appreciated.
> > >
> > > Regards
> > > Eric
> > >
> >
>

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