File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Unable to index a column values using Solr Apache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Unable to index a column values using Solr Apache" Watch "Unable to index a column values using Solr Apache" New topic
Author

Unable to index a column values using Solr Apache

kavi gam
Greenhorn

Joined: Sep 27, 2011
Posts: 6
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
Ranch Hand

Joined: Apr 04, 2009
Posts: 475
    
    3
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

Joined: Sep 27, 2011
Posts: 6
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
Ranch Hand

Joined: Apr 04, 2009
Posts: 475
    
    3
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

Joined: Sep 27, 2011
Posts: 6
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

Joined: May 29, 2012
Posts: 1
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to index a column values using Solr Apache
 
Similar Threads
insert followed by an update with CompositeUserType
I am getting HTTP Version Not Supported (505)Error
How to automate insert statement using hibernate config file
jaws.xml configuration not loading for cmp entity beans
won't create tables with jaws.xml