30 Sep 00:44
is EXACT_MATCH working?
Hello,
We are using Xappy to create indexes for package searching in Fedora.
Right now the results are a bit skewed due to freetext searches simply
matching the number of times a term shows up. I want to fix this
using exact matching on the package name so that if an exact match is
found we return that as the top result. This does not seem to work.
If I do this and remove all of the other matching fields we always get
an empty result
iconn.add_field_action('exact_name', xappy.FieldActions.INDEX_EXACT)
iconn.add_field_action('exact_name', xappy.FieldActions.STORE_CONTENT)
doc.fields.append(xappy.Field('exact_name', 'dbus', weight=100.0))
.
.
.
then searching for 'dbus' using xapian should return that match but we
get an empty set:
query = qp.parse_query('dbus')
enquire.set_query(query)
matches = enquire.get_mset(0, 10)
count = matches.get_matches_estimated()
print count
> 0
How do we get count working? BTW we are using xappy for indexing
because it presents a nice interface but xapian is simple enough on
(Continue reading)
RSS Feed