lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <>
Subject Re: Empty facets on Solr with MySQL
Date Thu, 02 Jan 2014 19:00:53 GMT
Hi Peter,

I think you meant faceting on cat_name_raw field.

Second check if that field is actually popupated. Below URL or at Schema Browser link.


On Thursday, January 2, 2014 8:45 PM, PeterKerk <> wrote:
I've set up Solr with MySQL.
My data import is succesful:

However, when trying to get the cat_name facets all facets are empty: 

    <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/wordp" user="***" password="***" />
        <document name="articles">
            <entity pk="ID" name="article" query="SELECT p.*, ( SELECT guid FROM
wp_posts WHERE id = m.meta_value ) AS imgurl 
    FROM wp_posts p
    LEFT JOIN  wp_postmeta m ON( = m.post_id AND m.meta_key = 
'_thumbnail_id' )
    WHERE p.post_type =  'post'
    AND p.post_status =  'publish';">
                <entity name="post_categories" query="select as
cat_name,wt.slug,wtr.term_taxonomy_id,wtt.term_id,wtt.taxonomy from 
    wp_term_relationships wtr
    INNER JOIN wp_term_taxonomy wtt ON
wtt.term_taxonomy_id=wtr.term_taxonomy_id AND wtt.taxonomy='category'
    INNER JOIN wp_terms wt ON wt.term_id=wtt.term_taxonomy_id
    where wtr.object_id='${}';">


    <field name="cat_name" type="text" indexed="true" stored="true"
multiValued="true"  />    
    <field name="cat_name_raw" type="string" indexed="true" stored="true"
multiValued="true" />
    <copyField source="cat_name" dest="cat_name_raw"/>

What am I missing?


View this message in context:
Sent from the Solr - User mailing list archive at

View raw message