yes this is expected; stopwords are never inserted in the index, and provided you are analyzing the query the same way they are also removed from the query conditions.
You can customize the definition of stopwords, so if "with" is an important term you can remove it from your stopwords list.
You may prefer to define your own analyzer using the very handy "analyzerdef" feature of Hibernate Search: usually SimpleAnalyzer is too limited and StandardAnalyzer too standard :-)
Look at example 1.10 of reference docs for an example.
If the "with" is coming from user input and you want to filter more than just on the daterange, you should show some form validation error like "query too vague, add some more terms" checking the query with the analyzer to see if it removed all significant words, before executing the query.
_________________ Sanne http://in.relation.to/
|