나는 사소한 일을하지 않았으며 스핑크스 나 솔르가 그것을 해결할 수있는 올바른 도구인지 이해하고 싶다. 단순화 된 예 : 내 사이트에 제품 설명별로 검색 할 수있는 검색 필드가 있습니다. mysql db의 다음 설명 :문구로 대부분의 일반적인 문구 검색
Id Desc
1 this is my test document number one. also checking search within phrases.
2 this is my test document number two
3 this is another group
4 this is first group
5 this is first test
6 this is your test
사용자가 검색 필드에 일부 텍스트를 입력 할 때. "is"는 다음 결과를 얻어야합니다 ("is"를 포함하는 상위 3 개 구). "this is", "is my", "is first"입니다.
다른 사람이 어떻게 할 수 있습니까? 어쩌면 지금 내 요구 사항에 맞는 더 나은 검색 엔진을 사용할 수 있습니까?
<fieldType class="solr.TextField" name="text_auto">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ShingleFilterFactory" maxShingleSize="4" outputUnigrams="true" outputUnigramsIfNoShingles="false" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.StandardFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
<field name="title" type="text_auto" indexed="true" stored="true"/>
<field name="content_autosuggest" type="text_auto" indexed="true" stored="true" multiValued="false"/>
<copyField source="title" dest="content_autosuggest"/>
감사합니다. Arun. 이 필터를 사용해 보겠습니다. –
접두어로만 패싯 쿼리를 검색하는 것처럼 보입니다. 전의. "is"를 찾으려고하면 "this is"가 반환되지 않습니다. –
qn을 정의한 필드의 fieldType으로 업데이트하십시오. – arun