SOLR在搜索时忽略逗号和其他标点符号 [英] SOLR ignoring comma and other punctuation while searching

查看:67
本文介绍了SOLR在搜索时忽略逗号和其他标点符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想通过查询 100000 来搜索 100,000 和 100000(或仅通过查询 100,000).
可以这样搜索吗.

I want to search 100,000 and 100000 only by querying 100000 (or only by querying 100,000).
Is it possible to search like that.

执行此操作的目的是,用户可以在任何位置添加逗号或根本不添加逗号,但无论如何都应搜索字符串(100,000 或 100000)...

The purpose to perform this is, that user may add a comma at any place or no comma at all but the strings (100,000 or 100000) should be searched anyway...

推荐答案

不知道这是否正确,但也许您可以编写某种过滤器工厂,其中数字总是被索引为用逗号和逗号格式化的数字.或者你可以同时拥有 index &查询分析器存储没有逗号的单词.

Don't know if this is correct, but maybe you can write some kind of filter factory where numbers are always indexed as numbers formatted with commas and with out commas. Or you can have both the index & query analyzer store the word w/o comma.

这篇关于SOLR在搜索时忽略逗号和其他标点符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆