This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to index a column values using Solr Apache

 
kavi gam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody help with this issue?

Using Solr Apache i am trying to index a column from table A , which has values like 'AL/BL 32185' and the type of the field is VARCHAR2. But when i try to search it doesn't return any results.

In data-config.xml i have defined

<filed column="M_NO" name="mNumber" />

and also in schema.xml i have defined <field name="mNumber" type="text" indexed="true" stored="true" />

Thanks in advance.
 
Karthik Shiraly
Bartender
Posts: 1208
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the query you used? And what type of queries do you want to support? Should it match if query is just "al" or just "32185"?
 
kavi gam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Karthik,

I am using the below query, but my question is this field (mNumber) is not getting indexed at all.
http://localhost:8080/apache-solr-3.3.0/mtls/select?q=32185

It should match if the query is al or 32185.

Thanks in advance.
 
Karthik Shiraly
Bartender
Posts: 1208
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Run through this checklist:

> Try the query "?q=mNumber:32185". If it returns hits, then the field is getting indexed correctly.

> mNumber should have a corresponding copyfield tag in schema.xml. Otherwise, it won't be included in a default field query like "?q=32185".

> Use solr admin interface or Luke tool to check whether the field is actually getting indexed.

I don't have v3.3.0 - just v1.4 - but if its "text" data type uses the same tokenizers and filters as 3.3.0, then I can see that a string like "AL/BL 32185" results in the tokens
al
bl
albl
32185
So as such your query and configuration seem ok for terms like "al" and "32185".
 
kavi gam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Karthik for the detailed reply.

Actually i made a mistake in data-config.xml file while defining this field
<filed column="M_NO" name="mNumber" /> now i corrected to field and which works fine.

Thank you very much.

 
karunaker reddy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kavi gam wrote:Thanks Karthik for the detailed reply.

Actually i made a mistake in data-config.xml file while defining this field
<filed column="M_NO" name="mNumber" /> now i corrected to field and which works fine.

Thank you very much.




where can I find data-config.xml?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic