开发者

Using integers in text-query

开发者 https://www.devze.com 2023-01-18 11:05 出处:网络
I am indexing a table of companies, where a lot of them have names starting with an integer, e.g: 2partner

I am indexing a table of companies, where a lot of them have names starting with an integer, e.g:

2partner 3m etc.

But when I try to do a simple solr-query like "2partner" (in Solr's webinterface), the integer "2" is removed by the query parser. Here's the debug:

<lst name="debug">
<str name="rawquerystring">2partner</str>
<str name="querystring">2partner</str>
<str name="parsedquery">text:partner</str>
<str name="parsedquery_toString">text:partner</str>

How do I avoid that?

Thanks in advance :-)

/Ca开发者_开发问答rsten


You are probably using a WordDelimiterFilterFactory with splitOnNumerics activated. Check the analyzers of the field you are storing this data into.

0

精彩评论

暂无评论...
验证码 换一张
取 消