Hi Erick, Thank your for your thoughts, I had exactly the same idea like your screenLCD suggestion (but with a semicolon) For example: range1 range2 range3 range_flags properties 80000 90 2001 range1;km, range2;kw, range3;year group;auto, make;audi, model;a4, color;red 50000 75 2003 range1;km, range2;kw, range3;year group;auto, make;nissan, model;primeria, ABS 40000 75 2004 range1;km, range2;kw, range3;year group;auto, make;nissan, model;primeria, ABS 4 null null range1;rooms group;immo, type;flat 16 null null range1;memory group;handy, make;iphone, model;3GS, memory;16GB
The range_flags column will describe the range1, range2, range3 columns so that you can do queries like: q=*:* fq=properties:group;auto fq=range_flags:range1;km fq=range1:[20000 TO 80000] The range_flag filter is not absolutely nessasary, but it ensures that you do range queries on the data you intent to. Regards Eric On Wed, May 12, 2010 at 3:12 PM, Erick Erickson <erickerick...@gmail.com>wrote: > 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 <impalah...@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 < > > findbestopensou...@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 < > > impalah...@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 > > > > > > > > > >