나는 내 조직에서 solr을 사용하기 위해 노력하고 있습니다. tomcat 6에 멀티 코어 solr 3.6으로 설정되었습니다.레코드를 반환하지 않는 solr 쿼리를 디버깅하는 방법
지금까지 필자는 우리 스키마의 특정 필드를 받아들이도록 예제 schema.xml을 수정했습니다. 레코드는 문제가되지 않으며 모든 레코드 (?q=*:*
)에 대한 쿼리를 실행하면 모든 것을 반환합니다. 그러나 레코드에있는 특정 검색어 (예 : ?q=green
또는 ?q=product_description:green
)를 쿼리하면 결과가 표시되지 않습니다. 내가 ipod_video.xml 또는 ipod_other.xml 같은 기본 예제 문서의 일부를 삽입하면 있지만, 그 기록은 그들을 위해 그들에 indexed=true
으로 정의되는 새로운 필드 (예 : ?q=ipod
또는 ?q=video
)
전체를 검색하면 올 않는다 그래서 우리가 질의를하면 왜 우리 자신의 기록이 전혀 올라 오지 않는지 확신 할 수 없습니다.
어떤 아이디어가이 문제를 디버깅하는 방법?
업데이트 - schema.xml 및 solrconfig.xml 세부 정보가 추가되었습니다. solrconfig.xml에서 요청 처리기 여기
<fields>
<field name="search_title" type="text_general" indexed="true" stored="true" multiValued="true"/>
<field name="search_prefix" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="search_description" type="text_general" indexed="true" stored="true" multiValued="true"/>
<field name="search_content" type="text_general" indexed="true" stored="true" multiValued="true"/>
<field name="product_date" type="date" indexed="true" stored="true" multiValued="true"/>
<field name="product_thumbnail" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="product_type" type="string" indexed="true" stored="true" multiValued="false"/>
<field name="product_updatepricefunction" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="tagids" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="tagid" type="string" indexed="true" stored="true" multiValued="true"/>
<dynamicField name="*_tag" type="string" indexed="true" stored="true"/>
<field name="event_id" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="activity_id" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="activity_function_code" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="search_room" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="weekday" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="activity_weekday" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="activity_begindate" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="activity_begintime" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="activity_endtime" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="audience" type="text_general" indexed="true" stored="true" multiValued="true"/>
<field name="format" type="text_general" indexed="true" stored="true" multiValued="true"/>
<field name="publish_date" type="date" indexed="true" stored="true" multiValued="true"/>
<field name="isbn" type="string" indexed="true" stored="true" multiValued="true" />
<field name="product_code" type="string" indexed="true" stored="true" required="true"/>
</fields>
<uniqueKey>product_code</uniqueKey>
된다 :
의 schema.xml 사실상 SOLR 3.6 그러나이 추가 된 필드와 함께 제공되는 기본의 schema.xml과 동일합니다 :
<requestHandler name="/select" class="solr.SearchHandler">
<!-- default values for query parameters can be specified, these
will be overridden by parameters in the request
-->
<lst name="defaults">
<str name="echoParams">explicit</str>
<int name="rows">10</int>
<str name="df">text</str>
</lst>
<!-- In addition to defaults, "appends" params can be specified
to identify values which should be appended to the list of
multi-val params from the query (or the existing "defaults").
-->
<!-- In this example, the param "fq=instock:true" would be appended to
any query time fq params the user may specify, as a mechanism for
partitioning the index, independent of any user selected filtering
that may also be desired (perhaps as a result of faceted searching).
NOTE: there is *absolutely* nothing a client can do to prevent these
"appends" values from being used, so don't use this mechanism
unless you are sure you always want it.
-->
<!--
<lst name="appends">
<str name="fq">inStock:true</str>
</lst>
-->
<!-- "invariants" are a way of letting the Solr maintainer lock down
the options available to Solr clients. Any params values
specified here are used regardless of what values may be specified
in either the query, the "defaults", or the "appends" params.
In this example, the facet.field and facet.query params would
be fixed, limiting the facets clients can use. Faceting is
not turned on by default - but if the client does specify
facet=true in the request, these are the only facets they
will be able to see counts for; regardless of what other
facet.field or facet.query params they may specify.
NOTE: there is *absolutely* nothing a client can do to prevent these
"invariants" values from being used, so don't use this mechanism
unless you are sure you always want it.
-->
<!--
<lst name="invariants">
<str name="facet.field">cat</str>
<str name="facet.field">manu_exact</str>
<str name="facet.query">price:[* TO 500]</str>
<str name="facet.query">price:[500 TO *]</str>
</lst>
-->
<!-- If the default list of SearchComponents is not desired, that
list can either be overridden completely, or components can be
prepended or appended to the default list. (see below)
-->
<!--
<arr name="components">
<str>nameOfCustomComponent1</str>
<str>nameOfCustomComponent2</str>
</arr>
-->
</requestHandler>
schema.xml 파일을 도와 줄 수 있습니까? – JHS
죄송합니다. 무슨 뜻인지 이해하지 못 하시겠습니까? – roy
schema.xml 파일과 solr-config.xml 파일에서/select requestHandler를보고 싶습니다. – JHS