You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Lukas, Ray" <Ra...@idearc.com> on 2009/02/27 17:26:33 UTC

Query against newly created index.. Do not work

 

I can now create indexes with Nutch, and see them in Luke.. this is
fantastic news, well for me it is beyond fantastic.. 
Now I would like to (need to) query them, and to that end I wrote the
following code segment.

		int maxHits = 1000;
		NutchBean nutchBean = new NutchBean(nutchConf);
		Query nutchQuery = Query.parse(nutchSearchTerm,
nutchConf);
		Hits nutchHits = nutchBean.search(nutchQuery, maxHits);
		return nutchHits.getLength();

In Luke if I do a query string like:

title:credit union

I receive 6 hits. The code above returns zero hits. I think that I am
doing this correctly, indeed coping this code directly from the WIKI
(thanks Chaz for giving us this).. 

searcher.dir, and plugin.folders inside of nutch-site.xml are correctly
set.

<property>
  <name>searcher.dir</name>
  <value>outputDir</value>
  <description>
 	 Path to root of crawl.  
  </description>
</property>
<property>
  <name>plugin.folders</name>
  <value>plugins</value>
  <description>
	Directories where nutch plugins are located.
  </description>
</property>

Any ideas? Oh and thanks for any help, of course.. 

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Query against newly created index.. Do not work

Posted by Chris Hostetter <ho...@fucit.org>.
: I can now create indexes with Nutch, and see them in Luke.. this is
: fantastic news, well for me it is beyond fantastic.. 
: Now I would like to (need to) query them, and to that end I wrote the
: following code segment.
: 
: 		int maxHits = 1000;
: 		NutchBean nutchBean = new NutchBean(nutchConf);
: 		Query nutchQuery = Query.parse(nutchSearchTerm,
: nutchConf);
: 		Hits nutchHits = nutchBean.search(nutchQuery, maxHits);
: 		return nutchHits.getLength();

...even though your code is written in java "java-user@lucene" isn't the 
appropriate mailing list for this type of question, java-user is for users 
of the Lucene Java API that is the underpinninings of Nutch (it's slightly 
confusing that the sub-projecct name has java in it)

If you ask your question on the nutch-user@lucene mailing list, i'm 
guessing you'll get a lot of feedback from people who are familiar with 
the Nutch java code.  (most people on this list probably have no idea what 
a NutchBean is)




-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org