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 Yang Lin <be...@gmail.com> on 2009/07/07 23:58:14 UTC
about defaultSearchField
Hi,
I have some problems.
For my solr progame, I want to type only the Query String and get all field
result that includ the Query String. But now I can't get any result without
specified field. For example, query with "tina" get nothing, but
"Sentence:tina" could.
I hava adjusted the *schema.xml* like this:
<fields>
> <field name="CategoryNamePolarity" type="text" indexed="true"
> stored="true" multiValued="true"/>
> <field name="CategoryNameStrenth" type="text" indexed="true"
> stored="true" multiValued="true"/>
> <field name="CategoryNameSubjectivity" type="text" indexed="true"
> stored="true" multiValued="true"/>
> <field name="Sentence" type="text" indexed="true" stored="true"
> multiValued="true"/>
>
> <field name="allText" type="text" indexed="true" stored="true"
> multiValued="true"/>
> </fields>
>
> <uniqueKey required="false">Sentence</uniqueKey>
>
> <!-- field for the QueryParser to use when an explicit fieldname is absent
> -->
> <defaultSearchField>allText</defaultSearchField>
>
> <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
> <solrQueryParser defaultOperator="OR"/>
>
> <copyfield source="CategoryNamePolarity" dest="allText"/>
> <copyfield source="CategoryNameStrenth" dest="allText"/>
> <copyfield source="CategoryNameSubjectivity" dest="allText"/>
> <copyfield source="Sentence" dest="allText"/>
I think the problem is in <defaultSearchField>, but I don't know how to fix
it. Could anyone help me?
Thanks
Yang
Re: about defaultSearchField
Posted by Yang Lin <be...@gmail.com>.
Yes, I have deleted whole "index" directory and re-index after making
changes.
Yang
2009/7/8 Jay Hill <ja...@gmail.com>
> Just to be sure: You mentioned that you "adjusted" schema.xml - did you
> re-index after making your changes?
>
> -Jay
>
>
> On Wed, Jul 8, 2009 at 7:07 AM, Yang Lin <be...@gmail.com> wrote:
>
> > Thanks for your reply. But it works not.
> >
> > Yang
> >
> > 2009/7/8 Yao Ge <ya...@gmail.com>
> >
> > >
> > > Try with fl=* or fl=*,score added to your request string.
> > > -Yao
> > >
> > > Yang Lin-2 wrote:
> > > >
> > > > Hi,
> > > > I have some problems.
> > > > For my solr progame, I want to type only the Query String and get all
> > > > field
> > > > result that includ the Query String. But now I can't get any result
> > > > without
> > > > specified field. For example, query with "tina" get nothing, but
> > > > "Sentence:tina" could.
> > > >
> > > > I hava adjusted the *schema.xml* like this:
> > > >
> > > > <fields>
> > > >> <field name="CategoryNamePolarity" type="text" indexed="true"
> > > >> stored="true" multiValued="true"/>
> > > >> <field name="CategoryNameStrenth" type="text" indexed="true"
> > > >> stored="true" multiValued="true"/>
> > > >> <field name="CategoryNameSubjectivity" type="text" indexed="true"
> > > >> stored="true" multiValued="true"/>
> > > >> <field name="Sentence" type="text" indexed="true" stored="true"
> > > >> multiValued="true"/>
> > > >>
> > > >> <field name="allText" type="text" indexed="true" stored="true"
> > > >> multiValued="true"/>
> > > >> </fields>
> > > >>
> > > >> <uniqueKey required="false">Sentence</uniqueKey>
> > > >>
> > > >> <!-- field for the QueryParser to use when an explicit fieldname is
> > > >> absent
> > > >> -->
> > > >> <defaultSearchField>allText</defaultSearchField>
> > > >>
> > > >> <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
> > > >> <solrQueryParser defaultOperator="OR"/>
> > > >>
> > > >> <copyfield source="CategoryNamePolarity" dest="allText"/>
> > > >> <copyfield source="CategoryNameStrenth" dest="allText"/>
> > > >> <copyfield source="CategoryNameSubjectivity" dest="allText"/>
> > > >> <copyfield source="Sentence" dest="allText"/>
> > > >
> > > >
> > > > I think the problem is in <defaultSearchField>, but I don't know how
> to
> > > > fix
> > > > it. Could anyone help me?
> > > >
> > > > Thanks
> > > > Yang
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> > >
> http://www.nabble.com/about-defaultSearchField-tp24382105p24384615.html
> > > Sent from the Solr - User mailing list archive at Nabble.com.
> > >
> > >
> >
>
Re: about defaultSearchField
Posted by Jay Hill <ja...@gmail.com>.
Just to be sure: You mentioned that you "adjusted" schema.xml - did you
re-index after making your changes?
-Jay
On Wed, Jul 8, 2009 at 7:07 AM, Yang Lin <be...@gmail.com> wrote:
> Thanks for your reply. But it works not.
>
> Yang
>
> 2009/7/8 Yao Ge <ya...@gmail.com>
>
> >
> > Try with fl=* or fl=*,score added to your request string.
> > -Yao
> >
> > Yang Lin-2 wrote:
> > >
> > > Hi,
> > > I have some problems.
> > > For my solr progame, I want to type only the Query String and get all
> > > field
> > > result that includ the Query String. But now I can't get any result
> > > without
> > > specified field. For example, query with "tina" get nothing, but
> > > "Sentence:tina" could.
> > >
> > > I hava adjusted the *schema.xml* like this:
> > >
> > > <fields>
> > >> <field name="CategoryNamePolarity" type="text" indexed="true"
> > >> stored="true" multiValued="true"/>
> > >> <field name="CategoryNameStrenth" type="text" indexed="true"
> > >> stored="true" multiValued="true"/>
> > >> <field name="CategoryNameSubjectivity" type="text" indexed="true"
> > >> stored="true" multiValued="true"/>
> > >> <field name="Sentence" type="text" indexed="true" stored="true"
> > >> multiValued="true"/>
> > >>
> > >> <field name="allText" type="text" indexed="true" stored="true"
> > >> multiValued="true"/>
> > >> </fields>
> > >>
> > >> <uniqueKey required="false">Sentence</uniqueKey>
> > >>
> > >> <!-- field for the QueryParser to use when an explicit fieldname is
> > >> absent
> > >> -->
> > >> <defaultSearchField>allText</defaultSearchField>
> > >>
> > >> <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
> > >> <solrQueryParser defaultOperator="OR"/>
> > >>
> > >> <copyfield source="CategoryNamePolarity" dest="allText"/>
> > >> <copyfield source="CategoryNameStrenth" dest="allText"/>
> > >> <copyfield source="CategoryNameSubjectivity" dest="allText"/>
> > >> <copyfield source="Sentence" dest="allText"/>
> > >
> > >
> > > I think the problem is in <defaultSearchField>, but I don't know how to
> > > fix
> > > it. Could anyone help me?
> > >
> > > Thanks
> > > Yang
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/about-defaultSearchField-tp24382105p24384615.html
> > Sent from the Solr - User mailing list archive at Nabble.com.
> >
> >
>
Re: about defaultSearchField
Posted by Yang Lin <be...@gmail.com>.
Thanks for your reply. But it works not.
Yang
2009/7/8 Yao Ge <ya...@gmail.com>
>
> Try with fl=* or fl=*,score added to your request string.
> -Yao
>
> Yang Lin-2 wrote:
> >
> > Hi,
> > I have some problems.
> > For my solr progame, I want to type only the Query String and get all
> > field
> > result that includ the Query String. But now I can't get any result
> > without
> > specified field. For example, query with "tina" get nothing, but
> > "Sentence:tina" could.
> >
> > I hava adjusted the *schema.xml* like this:
> >
> > <fields>
> >> <field name="CategoryNamePolarity" type="text" indexed="true"
> >> stored="true" multiValued="true"/>
> >> <field name="CategoryNameStrenth" type="text" indexed="true"
> >> stored="true" multiValued="true"/>
> >> <field name="CategoryNameSubjectivity" type="text" indexed="true"
> >> stored="true" multiValued="true"/>
> >> <field name="Sentence" type="text" indexed="true" stored="true"
> >> multiValued="true"/>
> >>
> >> <field name="allText" type="text" indexed="true" stored="true"
> >> multiValued="true"/>
> >> </fields>
> >>
> >> <uniqueKey required="false">Sentence</uniqueKey>
> >>
> >> <!-- field for the QueryParser to use when an explicit fieldname is
> >> absent
> >> -->
> >> <defaultSearchField>allText</defaultSearchField>
> >>
> >> <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
> >> <solrQueryParser defaultOperator="OR"/>
> >>
> >> <copyfield source="CategoryNamePolarity" dest="allText"/>
> >> <copyfield source="CategoryNameStrenth" dest="allText"/>
> >> <copyfield source="CategoryNameSubjectivity" dest="allText"/>
> >> <copyfield source="Sentence" dest="allText"/>
> >
> >
> > I think the problem is in <defaultSearchField>, but I don't know how to
> > fix
> > it. Could anyone help me?
> >
> > Thanks
> > Yang
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/about-defaultSearchField-tp24382105p24384615.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>
Re: about defaultSearchField
Posted by Yao Ge <ya...@gmail.com>.
Try with fl=* or fl=*,score added to your request string.
-Yao
Yang Lin-2 wrote:
>
> Hi,
> I have some problems.
> For my solr progame, I want to type only the Query String and get all
> field
> result that includ the Query String. But now I can't get any result
> without
> specified field. For example, query with "tina" get nothing, but
> "Sentence:tina" could.
>
> I hava adjusted the *schema.xml* like this:
>
> <fields>
>> <field name="CategoryNamePolarity" type="text" indexed="true"
>> stored="true" multiValued="true"/>
>> <field name="CategoryNameStrenth" type="text" indexed="true"
>> stored="true" multiValued="true"/>
>> <field name="CategoryNameSubjectivity" type="text" indexed="true"
>> stored="true" multiValued="true"/>
>> <field name="Sentence" type="text" indexed="true" stored="true"
>> multiValued="true"/>
>>
>> <field name="allText" type="text" indexed="true" stored="true"
>> multiValued="true"/>
>> </fields>
>>
>> <uniqueKey required="false">Sentence</uniqueKey>
>>
>> <!-- field for the QueryParser to use when an explicit fieldname is
>> absent
>> -->
>> <defaultSearchField>allText</defaultSearchField>
>>
>> <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
>> <solrQueryParser defaultOperator="OR"/>
>>
>> <copyfield source="CategoryNamePolarity" dest="allText"/>
>> <copyfield source="CategoryNameStrenth" dest="allText"/>
>> <copyfield source="CategoryNameSubjectivity" dest="allText"/>
>> <copyfield source="Sentence" dest="allText"/>
>
>
> I think the problem is in <defaultSearchField>, but I don't know how to
> fix
> it. Could anyone help me?
>
> Thanks
> Yang
>
>
--
View this message in context: http://www.nabble.com/about-defaultSearchField-tp24382105p24384615.html
Sent from the Solr - User mailing list archive at Nabble.com.