On all products I have I want to implement a price range filter.
Since this pricerange is applied on the entire population and not on a
single product, my assumption was that it would not make sense to define
this within the "shopitem" entity, but rather under the document
"shopitems". So that's what I did in my data-config below.

But now on these requests: 
        http://localhost:8983/solr/tt-shop/dataimport?command=reload-config
        http://localhost:8983/solr/tt-shop/dataimport?command=full-import
        
I get the error:
        DataImportHandler started. Not Initialized. No commands can be run

<dataConfig>
<dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost:1433;databaseName=****" user="******"
password="*****" />
    <document name="shopitems">
        <entity name="shopitem" pk="id" query="select * from products" >        
        
            <field name="id" column="ID" />
                        <field name="prijs" column="prijs" />
                        <field name="createdate" column="createdate" />
                        
        </entity>
                        <entity name=&quot;pricerange&quot; query=&quot;;With 
Categorized as
(Select 
 CASE When prijs &amp;lt;= 1000 Then '&lt;10'
      When prijs &amp;gt; 1000 and prijs &amp;lt;= 2500 Then '[10-25]'
          When prijs &amp;gt; 2500 and prijs &amp;lt;= 5000 Then '[25-50]'
      Else '>50'
 END as PriceCategory  From products)
Select PriceCategory, Count(*) as Cnt From Categorized Group By
PriceCategory ">
                        </entity>
                
    </document>
</dataConfig>




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Implement-price-range-filter-DataImportHandler-started-Not-Initialized-No-commands-can-be-run-tp4040418.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to