You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by krosan <kr...@gmail.com> on 2009/12/21 04:56:01 UTC

Documents are indexed but not searchable

Hi,

I'm trying to test solr for a proof of concept project, but I'm having some
problems.

I indexed my document, but when I search for a word which is 100% certain in
the document, I don't get any hits.

These are my files:

First: my data-config.xml

<dataConfig>
  <dataSource type="JdbcDataSource"
              driver="com.mysql.jdbc.Driver"
              url="jdbc:mysql://host.com:3306/crossfire3"
              user="user"
              password="pass"
              batchSize="1"/>
  <document>
    <entity name="users"
            query="select username, password, email from users">
		<field column="username" name="username" />
		<field column="password" name="password" />
		<field column="email" name="email" />
    </entity>
  </document>
</dataConfig>

Now, I have used this in the debugger, and with commit on, and verbose on, I
get this reply:

http://pastebin.com/m7a460711

This clearly states that those 2 rows have been processed and are now in the
index.
However, when I try to do a search with the http parameters, I get this
response:

For the hyperlink
http://localhost:8080/solr/select?q=username:krosan&debugQuery=on
this is the response:
http://pastebin.com/m7bb1dcaa

I'm clueless on what the problem could be!

These are my two config files:

schema.xml: http://pastebin.com/m1fd1da58
solrconfig.xml: http://pastebin.com/m44b73d83
(look for "krosan" in the documents to see what I've added to the standard
docs)

Any help will be greatly appreciated!

Thanks in advance,

Andreas Evers
-- 
View this message in context: http://old.nabble.com/Documents-are-indexed-but-not-searchable-tp26868925p26868925.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Documents are indexed but not searchable

Posted by Erik Hatcher <er...@gmail.com>.
solrconfig.xml controls where the index is built.   Set it there to  
the absolute path of where you want the index.

	Erik

On Dec 21, 2009, at 2:26 PM, krosan wrote:

>
> Hey,
>
> I just found out that my index is stored in the tomcat/solr dir,  
> while my
> -Dsolr.solr.home parameter is set to a different place (E drive). The
> indexing is sent to the tomcat/solr dir, while the searching is done  
> in my E
> drive. How can I make sure the index is done in the E dir as well?
>
> Thanks in advance!
>
> Andreas Evers
>
>
> ANKITBHATNAGAR wrote:
>>
>>
>>
>> Try using luke - to view contents of index
>>
>> Ankit
>>
>>
>
> -- 
> View this message in context: http://old.nabble.com/Documents-are-indexed-but-not-searchable-tp26868925p26878531.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


RE: Documents are indexed but not searchable

Posted by krosan <kr...@gmail.com>.
Hey,

I just found out that my index is stored in the tomcat/solr dir, while my
-Dsolr.solr.home parameter is set to a different place (E drive). The
indexing is sent to the tomcat/solr dir, while the searching is done in my E
drive. How can I make sure the index is done in the E dir as well?

Thanks in advance!

Andreas Evers


ANKITBHATNAGAR wrote:
> 
> 
> 
> Try using luke - to view contents of index
> 
> Ankit
> 
> 

-- 
View this message in context: http://old.nabble.com/Documents-are-indexed-but-not-searchable-tp26868925p26878531.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: Documents are indexed but not searchable

Posted by Ankit Bhatnagar <ab...@vantage.com>.

Try using luke - to view contents of index

Ankit


-----Original Message-----
From: krosan [mailto:krosan@gmail.com] 
Sent: Monday, December 21, 2009 10:22 AM
To: solr-user@lucene.apache.org
Subject: Re: Documents are indexed but not searchable


When searching for *:* I get this response:

<response>

<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">9</int>

<lst name="params">
<str name="q">*:*</str>
</lst>
</lst>
<result name="response" numFound="0" start="0"/>
</response>

I'm guessing this means the documents aren't really in the index?
However, I do get this reply when using the data-config debugger (with
commit on):
http://pastebin.com/m7a460711
And that obviously states "Indexing completed. Added/Updated: 2 documents.
Deleted 0 documents."

Do you have any ideas why the index doesn't really have those documents?

Thanks in advance!

Andreas Evers 



Noble Paul wrote:
> 
> just search for *:* and see if the docs are indeed there in the index.
> --Noble
> 
> -- 
> -----------------------------------------------------
> Noble Paul | Systems Architect| AOL | http://aol.com
> 
> 

-- 
View this message in context: http://old.nabble.com/Documents-are-indexed-but-not-searchable-tp26868925p26875427.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Documents are indexed but not searchable

Posted by krosan <kr...@gmail.com>.
When searching for *:* I get this response:

<response>

<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">9</int>

<lst name="params">
<str name="q">*:*</str>
</lst>
</lst>
<result name="response" numFound="0" start="0"/>
</response>

I'm guessing this means the documents aren't really in the index?
However, I do get this reply when using the data-config debugger (with
commit on):
http://pastebin.com/m7a460711
And that obviously states "Indexing completed. Added/Updated: 2 documents.
Deleted 0 documents."

Do you have any ideas why the index doesn't really have those documents?

Thanks in advance!

Andreas Evers 



Noble Paul wrote:
> 
> just search for *:* and see if the docs are indeed there in the index.
> --Noble
> 
> -- 
> -----------------------------------------------------
> Noble Paul | Systems Architect| AOL | http://aol.com
> 
> 

-- 
View this message in context: http://old.nabble.com/Documents-are-indexed-but-not-searchable-tp26868925p26875427.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Documents are indexed but not searchable

Posted by Noble Paul നോബിള്‍ नोब्ळ् <no...@corp.aol.com>.
just search for *:* and see if the docs are indeed there in the index.
--Noble
On Mon, Dec 21, 2009 at 9:26 AM, krosan <kr...@gmail.com> wrote:
>
> Hi,
>
> I'm trying to test solr for a proof of concept project, but I'm having some
> problems.
>
> I indexed my document, but when I search for a word which is 100% certain in
> the document, I don't get any hits.
>
> These are my files:
>
> First: my data-config.xml
>
> <dataConfig>
>  <dataSource type="JdbcDataSource"
>              driver="com.mysql.jdbc.Driver"
>              url="jdbc:mysql://host.com:3306/crossfire3"
>              user="user"
>              password="pass"
>              batchSize="1"/>
>  <document>
>    <entity name="users"
>            query="select username, password, email from users">
>                <field column="username" name="username" />
>                <field column="password" name="password" />
>                <field column="email" name="email" />
>    </entity>
>  </document>
> </dataConfig>
>
> Now, I have used this in the debugger, and with commit on, and verbose on, I
> get this reply:
>
> http://pastebin.com/m7a460711
>
> This clearly states that those 2 rows have been processed and are now in the
> index.
> However, when I try to do a search with the http parameters, I get this
> response:
>
> For the hyperlink
> http://localhost:8080/solr/select?q=username:krosan&debugQuery=on
> this is the response:
> http://pastebin.com/m7bb1dcaa
>
> I'm clueless on what the problem could be!
>
> These are my two config files:
>
> schema.xml: http://pastebin.com/m1fd1da58
> solrconfig.xml: http://pastebin.com/m44b73d83
> (look for "krosan" in the documents to see what I've added to the standard
> docs)
>
> Any help will be greatly appreciated!
>
> Thanks in advance,
>
> Andreas Evers
> --
> View this message in context: http://old.nabble.com/Documents-are-indexed-but-not-searchable-tp26868925p26868925.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>



-- 
-----------------------------------------------------
Noble Paul | Systems Architect| AOL | http://aol.com