문제

I am new to Solr and I don't know how to fire a query for Facet search. I have the following fields in my schema (I have put a schema.XML here). I have total 6 fields, on which I can try faceting. Is there any field to define for Faceting in schema.xml file?

<fields>
<field name="P_ID" type="int" indexed="true" stored="true" required="true" /> 
<field name="P_NAME" type="text" indexed="true" stored="true" required="false" />
<field name="P_SKU" type="string" indexed="true" stored="false" required="false" /> 
<field name="P_METADESCRIPTION" type="string" indexed="true" stored="false" 
required="false" /> 
<field name="P_PRICE" type="string" indexed="true" stored="false" required="false" /> 
<field name="P_OLDPRICE" type="string" indexed="true" stored="false" required="false" /> 
<field name="_version_" type="long" indexed="true" stored="true"/>   
  </fields>
  <unique Key>P_ID</unique Key> 
  <defaultSearchField>P_NAME</defaultSearchField>

How could I make a facet search query here?

도움이 되었습니까?

해결책

See, for faceting you don't have to modify anything in schema.xml. For better understanding about Facet search please go through the following link.

http://wiki.apache.org/solr/SimpleFacetParameters

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top