dismax is a fairly narrow-use parser. By that I mean it was created
to solve a specific issue. It has some pronounced warts as you've
discovered.
edismax is the preferred parser if you have access to it. I'd just
ignore dismax if you have access to edismax. There's been some
talk of deprecating
Here is my complete fieldtype:
fieldType name=name class=solr.TextField positionIncrementGap=100
analyzer
charFilter class=solr.HTMLStripCharFilterFactory/
tokenizer class=solr.PatternTokenizerFactory pattern=\s|, /
filter class=solr.LowerCaseFilterFactory/
When i use the edismax handler the escaping works great(before i used the
dismax handler).The debugQuery shows me this:
+((DisjunctionMaxQuery((name:arsenal)~1.0)
DisjunctionMaxQuery((name:london)~1.0))~2
The \ is not in the parsedquery, so i get the results i wanted. I don't
know why the dismax
Anybody?
--
View this message in context:
http://lucene.472066.n3.nabble.com/character-in-search-query-tp3168604p3182228.html
Sent from the Solr - User mailing list archive at Nabble.com.
Let's see the complete fieldType definition. Have you looked at
your index with, say, Luke and seen what's actually in your
index? And do you re-index after each schema change?
What does your admin/analysis page look like? Have you considered
PatternReplaceCharFilterFactory rather than the
using '\' to escape.
Best Wishes.
--
Best wishes
James Bond Fang
方 振鹏
Dept. Software Engineering
Xiamen University
-- Original --
From: roySolr;
Date: 2011年7月14日(星期四) 下午5:29
To: solr-user;
Subject: - character in
Using '\' to escape.
--
View this message in context:
http://lucene.472066.n3.nabble.com/character-in-search-query-tp3168604p3168612.html
Sent from the Solr - User mailing list archive at Nabble.com.
thanks!
I use the escape function of the solr pecl package to escape special
characters
http://docs.php.net/manual/kr/solrutils.escapequerychars.php
--
View this message in context:
http://lucene.472066.n3.nabble.com/character-in-search-query-tp3168604p3168638.html
Sent from the Solr - User
It looks like it's still not working.
I send this to SOLR: q=arsenal \- london
I get no results. When i look at the debugQuery i see this:
(name: arsenal | city:arsenal)~1.0 (name: \ | city:\)~1.0 (name: london |
city: london)~1.0
my requesthandler:
requestHandler name=dismax
Easy, the hyphen is out on its own (with spaces on either side) and is probably
getting removed from the search by the tokenizer. Check your analysis.
François
On Jul 14, 2011, at 6:05 AM, roySolr wrote:
It looks like it's still not working.
I send this to SOLR: q=arsenal \- london
I
Yes, i had some tokenizer like this:
tokenizer class=solr.PatternTokenizerFactory pattern=\s|-|, /
Now i removed the - from this tokenizer and the debugQuery looks like this:
(name:arsenal | city:arsenal)~1.0 (name:\- | city:\-)~1.0 (name:london |
city:london)~1.0
Still i get no results..
--
11 matches
Mail list logo