[Xapian-discuss] Using synonyms and order of results

Websuche :: Felix Antonius Wilhelm Ostmann ostmann at websuche.de
Mon Jan 30 09:28:00 GMT 2012


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]
...

Term List for record #64977: QMde QMint Zpunz punzen
Term List for record #125701: QMde QMint Zstempel Zstempelkiss Zstempeln
stempel stempelkissen stempeln


Perhaps there is a solution by building a special search or two searches
(first without synonym, second with), but the problem starts, when there
are 3.. terms to search for, all with synoynms.

Is there a way to prefer results with exact hits?



More information about the Xapian-discuss mailing list