• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Unable to index a column values using Solr Apache

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
reply
    Bookmark Topic Watch Topic
  • New Topic