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 Jörg Agatz <jo...@googlemail.com> on 2009/05/26 11:11:44 UTC

Solrits - Problem with Index...

Hallo...

I create with a croler a Index, it is not a original Solr index, but a
"Lucene" so it works...
when i go to the Admin Page i can send a Search and get a result...

Like tis:

URL:
http://192.168.105.56:8983/solr/select/?q=summary%3Aplesnik&version=2.2&start=0&rows=10&indent=on
Result:
*
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">3</int>
<lst name="params">
<str name="indent">on</str>
<str name="start">0</str>
<str name="q">summary:plesnik</str>
<str name="version">2.2</str>
<str name="rows">10</str>
</lst>
</lst>
<result name="response" numFound="115" start="0">
<doc>
<arr name="content">
<str>
Ingenieurbüro Dr. Plesnik GmbH
</str>
</arr>
<arr name="extension">
<str>pdf</str>
</arr>
<arr name="last-modified">
<str>20090518</str>
</arr>
<arr name="mimetype">
<str>application/pdf</str>
</arr>
<arr name="size">
<str>150654</str>
</arr>
<arr name="summary">
<str>
Ingenieurbüro Dr. Plesnik GmbH
</str>
</arr>
<arr name="url">
<str>
file://Q%3A/Daten/AADMS/rechnungswesen/cache/gutschrift/GS09050401.pdf
</str>
</arr>
</doc>*

It is only one example, the hole relsults to long :-)

But when i do the Same with Solritas, i get Nothing...

i do this:
http://192.168.105.56:8983/solr/itas/?q=summary%3Aplesnik&version=2.2&start=0&rows=10&indent=on

But when i do this:
http://192.168.105.56:8983/solr/itas/?q=
i get the Hole index as result

I cant search anything in Solritas...
Someone know what happens?

Re: Solrits - Problem with Index...

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On May 26, 2009, at 10:44 AM, Jörg Agatz wrote:
> in witch Ducument i must remove the defType parameter..
>
> i found "defType"only in solrConfig.xml. but i found two Configs..
> one in "apache-solr-nightly\example\solr\conf". and one in
> "apache-solr-nightly\contrib\velocity\src\main\solr\conf"
>
> i only remove "defType=dismax" ? in with of the Conf?

Note how you launch Solr, you're pointing at the contrib/velocity  
default configuration there.  You'll want to copy/adapt that home  
directory and make it your own for your project of course.

Yes, remove <str name="defType">dismax</str> from solrconfig.xml (and  
the qf parameter too, while you're at it)

	Erik



Re: Solrits - Problem with Index...

Posted by Jörg Agatz <jo...@googlemail.com>.
in witch Ducument i must remove the defType parameter..

i found "defType"only in solrConfig.xml. but i found two Configs..
one in "apache-solr-nightly\example\solr\conf". and one in
"apache-solr-nightly\contrib\velocity\src\main\solr\conf"

i only remove "defType=dismax" ? in with of the Conf?

Re: Solrits - Problem with Index...

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On May 26, 2009, at 10:13 AM, Jörg Agatz wrote:
> ok, now i understand.. the phraser fram solrtis, or the phraser, that
> solrtis is using... do not work with: (fieldname:term)

To be precise... "parser".

> but how i can change the default search field from solrtis?
> and how can i search in a special field?

Let's take Solritas out of the picture here for the sake of query  
parsing.  The /itas mapping is really just a convenience to get a cute  
URL /solr/itas - feel free to use whatever request handler mapping you  
want.

To change the default search field (meaning the one Lucene query  
parser uses when no field selector is specified), change  
<defaultSearchField> in schema.xml.

> Change /itas to use "lucene" (or remove the defType parameter  
> altogether)
> and you'll have the same syntax available to both the admin search  
> box and
> the Solritas UI.
>
> whith way is the best? and easyest way for me?

Just remove defType=dismax from the /itas mapping in solrconfig.xml  
(and you can remove qf then too, since only dismax uses that).

	Erik


Re: Solrits - Problem with Index...

Posted by Jörg Agatz <jo...@googlemail.com>.
ok, now i understand.. the phraser fram solrtis, or the phraser, that
solrtis is using... do not work with: (fieldname:term)

but how i can change the default search field from solrtis?
and how can i search in a special field?

Change /itas to use "lucene" (or remove the defType parameter altogether)
and you'll have the same syntax available to both the admin search box and
the Solritas UI.

whith way is the best? and easyest way for me?

Re: Solrits - Problem with Index...

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On May 26, 2009, at 9:59 AM, Jörg Agatz wrote:

>>
>>
>> Sounds like it's just purely working out the basics of what  
>> field(s) you
>> want to search on, and indexing them properly.
>>
>>       Erik
>>
>>
> coud bee, but when i use the admin page to search.. it works...
>
> I search in the field "summary" the word "plesnik"
>
> so i doo "*summary:plesnik*" in the search field

Query parsing is your culprit now.  Again, the /itas mapping by  
default uses the dismax parser, which does not support Lucene query  
parser syntax (fieldname:term).

Note that this particular issue is not Solritas related, but rather  
how queries are being parsed by different parsers.  The parser used by  
the admin search box is the Lucene query syntax.  Change /itas to use  
"lucene" (or remove the defType parameter altogether) and you'll have  
the same syntax available to both the admin search box and the  
Solritas UI.

	Erik
  

Re: Solrits - Problem with Index...

Posted by Jörg Agatz <jo...@googlemail.com>.
>
>
> Sounds like it's just purely working out the basics of what field(s) you
> want to search on, and indexing them properly.
>
>        Erik
>
>
coud bee, but when i use the admin page to search.. it works...

I search in the field "summary" the word "plesnik"

so i doo "*summary:plesnik*" in the search field

Re: Solrits - Problem with Index...

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On May 26, 2009, at 9:39 AM, Jörg Agatz wrote:
> fields in index:
> extension, title, url, last-modified, size, some oter...
> 136 Documents in the index
>
>
> when i do this:
>
> http://192.168.105.54:8983/solr/itas/?q=summary%3Aplesnik&version=2.2&start=0&rows=10&indent=on&wt=velocity&v.template=browse
>
> I get Nothing back from solritas

you're searching on summary:Aplesnik - that wasn't listed in the  
fields above.

> 0 results found in 30 ms
>
>
> if i do this (Frontpage)
> http://192.168.105.54:8983/solr/itas/?
>
> i Get:
> 136 results found in 38 ms
> i see all documents.

Right, because without a query it falls back to doing a *:* (match all  
documents) query in order to show facets.

> when i use the Original Test index, i become resurlts, somthing  
> wrong, but
> what?

Add &debugQuery=true to see what the query is parsed to (set wt=xml to  
see the details).

Sounds like it's just purely working out the basics of what field(s)  
you want to search on, and indexing them properly.

	Erik


Re: Solrits - Problem with Index...

Posted by Jörg Agatz <jo...@googlemail.com>.
Fist the Facts...
Ubuntu 8.10 2GB RAM
Nightlybuild from 24.05.09

fields in index:
extension, title, url, last-modified, size, some oter...
136 Documents in the index


when i do this:

http://192.168.105.54:8983/solr/itas/?q=summary%3Aplesnik&version=2.2&start=0&rows=10&indent=on&wt=velocity&v.template=browse

I get Nothing back from solritas

0 results found in 30 ms


if i do this (Frontpage)
http://192.168.105.54:8983/solr/itas/?

i Get:
136 results found in 38 ms
i see all documents.

I cant search.. always get Nothing..


when i use the Original Test index, i become resurlts, somthing wrong, but
what?

Re: Solrits - Problem with Index...

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On May 26, 2009, at 5:11 AM, Jörg Agatz wrote:
> when i go to the Admin Page i can send a Search and get a result...
>
> Like tis:
>
> URL:
> http://192.168.105.56:8983/solr/select/?q=summary%3Aplesnik&version=2.2&start=0&rows=10&indent=on
> Result:
> It is only one example, the hole relsults to long :-)
>
> But when i do the Same with Solritas, i get Nothing...
>
> i do this:
> http://192.168.105.56:8983/solr/itas/?q=summary%3Aplesnik&version=2.2&start=0&rows=10&indent=on
>
> But when i do this:
> http://192.168.105.56:8983/solr/itas/?q=
> i get the Hole index as result
>
> I cant search anything in Solritas...
> Someone know what happens?


The default /itas mapping that I believe you're using is this:

   <requestHandler name="/itas" class="solr.SearchHandler">
      <lst name="defaults">
        <str name="v.template">browse</str>
        <str name="v.properties">velocity.properties</str>
        <str name="title">Solritas</str>

        <str name="wt">velocity</str>
        <str name="defType">dismax</str>
        <str name="q.alt">*:*</str>
        <str name="rows">10</str>
        <str name="fl">*,score</str>
        <str name="facet">on</str>
        <str name="facet.field">cat</str>
        <str name="facet.mincount">1</str>
        <str name="qf">
           text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1  
cat^1.4
        </str>
      </lst>
   </requestHandler>

Note that it is doing a dismax query with the qf set to the example  
fields.

You can adjust the configuration in solrconfig.xml, create your own  
mapping, or bypass it altogether.  Solritas is simply a response  
writer, so your query that worked above could be written out from  
Solritas by simply adding &wt=velocity&v.template=browse on the URL:

> http://192.168.105.56:8983/solr/itas/?q=summary%3Aplesnik&version=2.2&start=0&rows=10&indent=on&wt=velocity&v.template=browse

	Erik