This is schema.xml ### <?xml version="1.0" ?>
<schema name="db" version="1.1"> <types> <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/> <fieldType name="integer" class="solr.IntField" omitNorms="true"/> <fieldType name="long" class="solr.LongField" omitNorms="true"/> <fieldType name="float" class="solr.FloatField" omitNorms="true"/> <fieldType name="double" class="solr.DoubleField" omitNorms="true"/> <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/> <fieldType name="date" class="solr.DateField" sortMissingLast="true" omitNorms="true"/> <fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/> <fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/> <fieldType name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="true"/> <fieldType name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="true"/> <fieldType name="random" class="solr.RandomSortField" indexed="true"/> <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="solr.WhitespaceTokenizerFactory"/> </analyzer> </fieldType> <fieldType name="text" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <!--<tokenizer class="solr.LowerCaseTokenizerFactory"/>--> <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/> <filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/> <filter class="solr.LengthFilterFactory" min="4" max="100"/> <filter class="solr.PorterStemFilterFactory"/> <filter class="solr.RemoveDuplicatesTokenFilterFactory"/> </analyzer> <analyzer type="query"> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <!--<tokenizer class="solr.LowerCaseTokenizerFactory"/>--> <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/> <filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/> <filter class="solr.LengthFilterFactory" min="4" max="100"/> <filter class="solr.PorterStemFilterFactory"/> <filter class="solr.RemoveDuplicatesTokenFilterFactory"/> </analyzer> </fieldType> <fieldtype name="ignored" stored="false" indexed="false" class="solr.StrField"/> </types> <!-- LOCAL CONFIG --> <fields> <!-- article --> <field name="article_id" type="long" indexed="true" stored="true" required="true"/> <field name="article_nom" type="string" indexed="true" stored="true"/> <field name="article_auteur_id" type="long" indexed="true" stored="true"/> <field name="article_typeArt_id" type="long" indexed="true" stored="true"/> <field name="article_dateCreation" type="string" indexed="true" stored="true"/> <field name="article_dateDerniereModif" type="string" indexed="true" stored="true"/> <!-- article_categorie --> <field name="article_categorie_articles_id" type="long" indexed="true" stored="true"/> <field name="article_categorie_categorie_id" type="long" indexed="true" stored="true"/> <!-- article_groupe --> <field name="article_groupe_articles_id" type="long" indexed="true" stored="true"/> <field name="article_groupe_groupeArticle_id" type="long" indexed="true" stored="true"/> <field name="article_groupe_Article_id" type="long" indexed="true" stored="true"/> <field name="article_groupe_groupe_id" type="long" indexed="true" stored="true"/> <!-- section --> <field name="section_id" type="long" indexed="true" stored="true"/> <field name="section_article_id" type="long" indexed="true" stored="true"/> <field name="section_typesection_id" type="long" indexed="true" stored="true"/> <!-- utilisateur --> <field name="utilisateur_id" type="long" indexed="true" stored="true"/> <field name="utilisateur_email" type="string" indexed="true" stored="true"/> <field name="utilisateur_fullname" type="string" indexed="true" stored="true"/> <field name="utilisateur_isAdmin" type="long" indexed="true" stored="true"/> <field name="utilisateur_password" type="string" indexed="true" stored="true"/> <field name="utilisateur_groupe_id" type="long" indexed="true" stored="true"/> <field name="utilisateur_role_id" type="long" indexed="true" stored="true"/> <!-- categorie --> <field name="categorie_id" type="long" indexed="true" stored="true" multiValued="true"/> <field name="categorie_nom" type="string" indexed="true" stored="true" multiValued="true"/> <!-- typeart <field name="typeart_id" type="string" indexed="true" stored="true"/> <field name="typeart_nom" type="string" indexed="true" stored="true"/> --> <!-- groupe pas du tout indexé--> <!--<field name="groupe_id" type="string" indexed="true" stored="true"/>--> <!--a verifier--> <!-- contenusection --> <field name="contenusection_id" type="long" indexed="true" stored="true"/> <field name="contenusection_section_id" type="long" indexed="true" stored="true" multiValued="true"/> <field name="contenusection_dateCreation" type="string" indexed="true" stored="true" multiValued="true"/> <!-- composant --> <field name="composant_id" type="long" indexed="true" stored="true"/> <field name="composant_contenu" type="string" indexed="true" stored="true" multiValued="true"/> <field name="composant_contenuSection_id" type="long" indexed="true" stored="true" multiValued="true"/> <field name="composant_nom" type="string" indexed="true" stored="true" multiValued="true"/> <!-- fin verif --> <!-- default search a verify <field name="text" type="text" indexed="true" stored="false" multiValued="true" termVectors="true"/>--> <dynamicField name="attr_*" type="text" indexed="true" stored="true" multiValued="true"/> </fields> <uniqueKey>article_id</uniqueKey> <!--<defaultSearchField>article_nom</defaultSearchField> --> <defaultSearchField>article_nom</defaultSearchField> <!-- <defaultSearchField>article_nom and composant_contenu</defaultSearchField> --> <solrQueryParser defaultOperator="OR"/> </schema> ########## Here is all good except that I indexed correctly contenusection and composant, but with no values inside and I don't know why, cause in my base they have values! In my DB Contenusection_id is a long. Example of my contenusection table: Colums: id dateCreation section_id Modifier Éditer en place Copier Effacer 1 2012-06-13 10:00:30 20 ... I was looking around the SQL request in the data-config.xml, but I can't find errors over there. Schema browser contenusection is empty: ### Field: contenusection_id Field Type: LONG Properties: Indexed, Stored, Omit Norms Index Analyzer: org.apache.solr.schema.FieldType$DefaultAnalyzer Query Analyzer: org.apache.solr.schema.FieldType$DefaultAnalyzer ### Schema browser section id is filled: ### Field: section_id Field Type: LONG Properties: Indexed, Stored, Omit Norms Schema: Indexed, Stored, Omit Norms Index: Indexed, Stored, Omit Norms Index Analyzer: org.apache.solr.schema.FieldType$DefaultAnalyzer Query Analyzer: org.apache.solr.schema.FieldType$DefaultAnalyzer Distinct: 18 Top Terms term frequency 104 1 110 1 118 1 119 1 127 1 128 1 130 1 131 1 133 1 140 1 Histogram 18 1 ### Thank you -----Message d'origine----- De : Gora Mohanty [mailto:g...@mimirtech.com] Envoyé : vendredi 10 août 2012 10:50 À : solr-user@lucene.apache.org Objet : Re: solr indexing problem On 10 August 2012 14:09, Videnova, Svetlana <svetlana.viden...@logica.com> wrote: > Hi everybody, someone can help me please with this: > > > > I have a problem to index the part named "contenusection". > > > -Data-config.xml : > <entity name="contenusection" query="select * from contenusection > where section_id = '${section.id}'"> > > Section.id Is ok => <field column="id" name="section_id"/> It is a little difficult to understand what you are saying (please share the complete schema.xml, and the the DIH configuration file), but if I understand correctly, what you need to do is to add another entry in the DIH configuration file, something like: <field column="contenusection_id" name="contenusection_id"/> The exact setting would depend on what column in the dat abase corresponds to contenusection_id Regards, Gora Think green - keep it on the screen. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.