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 Pratik <pr...@yahoo.com> on 2011/05/01 15:44:30 UTC

Re: solr sorting problem

Hello, 

I got over that problem but now i am facing a new problem. 

Indexing works but search does not. 

I used the following line in the schema:- 
<field name="alphaname" type="alphaOnlySort" indexed="true" stored="false"/> 
and 
<copyField source="foodDescUS" dest="alphaname"/> 

I'm trying to use the default "alphaOnlySort" in the sample schema.xml. 
Database is MySQL, there is a column/field named ColXYZ 
My data-config looks like :- 
<field column="ColXYZ" name="foodDescUS" /> 
<field column="ColXYZ" name="alphaname" /> 

In which scenarios would SOLR index the records/documents but the search
won't work 

Thanks --
View this message in context: http://lucene.472066.n3.nabble.com/solr-sorting-problem-tp486144p2886248.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: solr sorting problem

Posted by Erick Erickson <er...@gmail.com>.
Your query is going against the default field (defined in schema.xml). Have
you tried a fielded search?

And it would best to start a new thread for new questions see:
http://people.apache.org/~hossman/#threadhijack

Best
Erick

On Mon, May 2, 2011 at 3:46 AM, Pratik <pr...@yahoo.com> wrote:
> Hi,
> Thanks for your reply.
>
> I'm, using "commit=true" while indexing, and it does index the records and
> show the number of records indexed.
> The problem is that search yields 0 records ( numFound="0" ).
>
> e.g.
> <response><lst name="responseHeader"><int name="status">0</int><int
> name="QTime">0</int><lst name="params"><str name="indent">on</str><str
> name="q">appl</str></lst></lst><result name="response" numFound="0"
> start="0"/></response>
>
> There are some entries for spell checking in my schema too.
> e.g.
> <field name="f_spell_en" type="textSpell_en"/>
> <copyField source="foodDescUS" dest="f_spell_en"/>
>
> The Search URL is something like:-
> http://localhost:8983/solr/select/?q=apple&indent=on
> http://localhost:8983/solr/select/?q=apple&version=2.2&start=0&rows=10&indent=on
>
> Cache could not be a problem as it did not fetch any records from the very
> begining.
>
> So, basically it does not fetch any documents/records whereas it does index
> them.
>
> Thanks
> Pratik
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/solr-sorting-problem-tp486144p2889075.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: solr sorting problem

Posted by Pratik <pr...@yahoo.com>.
Hi, 
Thanks for your reply. 

I'm, using "commit=true" while indexing, and it does index the records and
show the number of records indexed. 
The problem is that search yields 0 records ( numFound="0" ). 

e.g. 
<response><lst name="responseHeader"><int name="status">0</int><int
name="QTime">0</int><lst name="params"><str name="indent">on</str><str
name="q">appl</str></lst></lst><result name="response" numFound="0"
start="0"/></response> 

There are some entries for spell checking in my schema too. 
e.g. 
<field name="f_spell_en" type="textSpell_en"/>
<copyField source="foodDescUS" dest="f_spell_en"/> 

The Search URL is something like:- 
http://localhost:8983/solr/select/?q=apple&indent=on 
http://localhost:8983/solr/select/?q=apple&version=2.2&start=0&rows=10&indent=on

Cache could not be a problem as it did not fetch any records from the very
begining. 

So, basically it does not fetch any documents/records whereas it does index
them.

Thanks
Pratik 

--
View this message in context: http://lucene.472066.n3.nabble.com/solr-sorting-problem-tp486144p2889075.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: solr sorting problem

Posted by Lance Norskog <go...@gmail.com>.
Two scenarios:
1) you call the indexing API but do not call 'commit'. This makes data
visible to searching.
2) the default solrconfig has HTTP caching turned on. So you redo the
search url, and you get the old result. This is really really
annoying. And you have to change the configuration to specifically not
cache, as shown in the comments.

On Sun, May 1, 2011 at 6:44 AM, Pratik <pr...@yahoo.com> wrote:
> Hello,
>
> I got over that problem but now i am facing a new problem.
>
> Indexing works but search does not.
>
> I used the following line in the schema:-
> <field name="alphaname" type="alphaOnlySort" indexed="true" stored="false"/>
> and
> <copyField source="foodDescUS" dest="alphaname"/>
>
> I'm trying to use the default "alphaOnlySort" in the sample schema.xml.
> Database is MySQL, there is a column/field named ColXYZ
> My data-config looks like :-
> <field column="ColXYZ" name="foodDescUS" />
> <field column="ColXYZ" name="alphaname" />
>
> In which scenarios would SOLR index the records/documents but the search
> won't work
>
> Thanks --
> View this message in context: http://lucene.472066.n3.nabble.com/solr-sorting-problem-tp486144p2886248.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Lance Norskog
goksron@gmail.com