Thank you for your help! Just to be clear: I wasn't asking for the syntax, but I was wondering if in your judgment this approach is appropriate. Will it give sensible results? Are there drawbacks in performance, flexibility, etc.? Is there an better way to do it?
Thanks, Paul On Thu, Oct 25, 2012 at 11:13 AM, Upayavira <[email protected]> wrote: > In Solr syntax: > <field name="category" boost="8">entertainment</field> > <field name="category" boost="4">tv</field> > <field name="category" boost="20">sports</field> > <field name="category" boost="5">entertainment</field> > > That way: category(football tv) would do as you require, and would boost > football above TV. > > That is - use index time boosts on your fields when you add them. > > Upayavira > > On Thu, Oct 25, 2012, at 06:16 PM, Paul Jungwirth wrote: >> Hello, >> >> I have documents with various tags, and each tag has a numeric score, >> so one document might be tagged "sports:20, entertainment:5, >> football:10", and another "entertainment:8, tv:4". I'd like to let >> people search by one or more tags, e.g. "football tv", and have the >> results sorted with higher-scored tags first. I thought I could do >> this by adding a separate Field for each tag (all named "tag" or >> whatever), and then boosting the fields according to their score. Does >> that seem like a good approach, or is there some cleaner way? I've >> been reading the Lucene in Action book and looking through the online >> docs, but I haven't found this usage scenario anywhere. >> >> Thanks, >> Paul >> >> -- >> _________________________________ >> Pulchritudo splendor veritatis. -- _________________________________ Pulchritudo splendor veritatis.
