Hi,
This is not directly related to Lucy per se, but a good place to ask:
In my experience with search engines in general, I've noticed that a
search such as
site:test.com bob
will restrict the results to pages from test.com (the + seems to be
implied on the site field, so the search seems to become:
+site:test.com bob).
In fact, google seems to go further. My tests show that google
changes the above query to:
+site:test.com +bob
I'm trying to mimic the expected behaviour as closely as possible so
as not to frustrate/alienate my users.
So, fiddle with the query terms behind the scenes and transform them
to +site:test.com +bob... an idea which doesn't feel right.
...or, change the default QueryParser behaviour from OR to AND:
my $query_parser = Lucy::Search::QueryParser->new(
schema => $schema,
default_boolop => 'AND',
);
I have a feeling that google is defaulting to AND for most cases.
Comments, experience, gut-feel?
Thanks