3 Feb 11:10
Re: Using synonyms and order of results
Websuche :: Felix Antonius Wilhelm Ostmann <ostmann <at> websuche.de>
2012-02-03 10:10:15 GMT
2012-02-03 10:10:15 GMT
I found a simple solution by using OP_AND_MAYBE and OP_SCALE_WEIGHT! The new query: [QUERY: Xapian::Query((0.5 * ((Zstempel:(pos=1) SYNONYM Zamtszeich:(pos=1) SYNONYM Zgrubenholz:(pos=1) SYNONYM Zkennzeich:(pos=1) SYNONYM Zpoststempel:(pos=1) SYNONYM Zpragestempel:(pos=1) SYNONYM Zpunz:(pos=1) SYNONYM Zsiegel:(pos=1)) FILTER QMde) AND_MAYBE Zstempel:(pos=1)))] It also works with multiple terms. Again, xapian is simple and fast! Am 30.01.2012 10:28, schrieb Websuche :: Felix Antonius Wilhelm Ostmann: > We are using FLAG_AUTO_SYNONYMS and it works like a charm (+stemmer), > but we currently have a problem with the order of the results. We think, > the best result will be a result without a synoym. > > We search for stempel (german for chop) and after FLAG_AUTO_SYNONYMS > (+STEM_SOME as stemming strategy) we get the following query: > > [QUERY: Xapian::Query(((Zstempel:(pos=1) SYNONYM Zamtszeich:(pos=1) > SYNONYM Zgrubenholz:(pos=1) SYNONYM Zkennzeich:(pos=1) SYNONYM > Zpoststempel:(pos=1) SYNONYM Zpragestempel:(pos=1) SYNONYM Zpunz:(pos=1) > SYNONYM Zsiegel:(pos=1)) FILTER QMde))] > > [POS: 0] [PERCENT: 100%] [WEIGHT:10.153175] [ID: 64977] [PID: 8876897] > ... > [POS: 38] [PERCENT: 100%] [WEIGHT:8.763471] [ID: 125701] [PID: 9023761] > ...(Continue reading)
RSS Feed