On Thu, Feb 11, 2010 at 1:52 PM, Ahmet Arslan <iori...@yahoo.com> wrote:
>> What I really want is the equivalent of a match like this
>> along with
>> the normal tokenized matching (where the query has been
>> lowercased and
>> trimmed as well):
>> select * from blah where lowercase(column) like '%query%';
>> I think this is called a phrase match or something like
>> that.
>
> Can your query consist of more than one words?

Yes, and I expect it almost always will (the query string is coming
from a search box on a website).


>> However, wildcards cannot be used at the beginning of query so I
>> guess I can live with only being able to startsWith type matching until
>> that is fixed.
>
> With solr.ReversedWildcardFilterFactory it is possible. But it is in 1.4.0.

OK, so I may need to seriously look at SOLR 1.4 if I want to do a
"*stuff*" search.


>> For now I have tried to do that using this:
>> query = (summary:"my item" || summaryExact:"my item*"^3)
>> but I would do this if I could:
>> query = (summary:"my item" || summaryExact:"*my item*"^3)
>
> If you use string type for summaryExact you can run this query 
> summaryExact:my\ item* It will bring you all documents begins with my item.

Actually it won't. The data I am indexing has extra spaces in front
and is capitalized. I really need to be able to filter it through the
lowercase and trim filter without tokenizing it.
Is there a way to apply filters to the string type (I am pretty sure
there is not)?


>> The idea is that a "phrase" match would be boosted over the
>> normal
>> token matches and would show up first in the listing. Let
>> me know if
>> more examples would help. I am happy to provide them.
>
> More examples will be great. Because boosting phrase match on a tokenized 
> field can be achieved by something like "my item"^5 my item
> I didn't understand need of * operator.
> Also this query will retrieve documents below:
>
> something my item something
> my something item something
>
> We can say that it already behaves %like% query.

This doesn't seem to align with the results I am seeing when I do
searches. Are you saying that if I do a search like this it will boost
the phrase matches while still doing token matches?
q=summary:"my item"^5

or do I have to not use my summary field (the one I copy the other fields into).

-AZ


-- 
Aaron Zeckoski (azeckoski (at) vt.edu)
Senior Research Engineer - CARET - University of Cambridge
https://twitter.com/azeckoski - http://www.linkedin.com/in/azeckoski
http://aaronz-sakai.blogspot.com/ - http://tinyurl.com/azprofile

Reply via email to