Default Searches not working after migrating from Solr 4.7 to 7.3

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Default Searches not working after migrating from Solr 4.7 to 7.3

THADC
Hello,

Migrating our system from solr 4.7 to 7.3. Simple default searches are not
working. For our simply searches, we had the following in our schema.xml for
4.7:

 <defaultSearchField>text</defaultSearchField>

, however for 7.3, "defaultSearchField" apparently no longer a valid type. I
switched to "df". Also, "text" is no longer default data type, but rather
"_text_". So, I replaced above with:

<df>_text_</df>

, but still default search not working properly. By the way, when I say "not
working properly"  I am testing this in solr admin by entering various
strings like "car" or "title" or "service" and nothing is returned. However,
when I enter "text:car" or "text:title" or "text:service" data is returned.
I need the default (i.e., not specifier left of colon) to work.

Grateful for any help. thank you





--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Reply | Threaded
Open this post in threaded view
|

Re: Default Searches not working after migrating from Solr 4.7 to 7.3

Shawn Heisey-2
On 5/17/2018 7:23 AM, THADC wrote:

> , however for 7.3, "defaultSearchField" apparently no longer a valid type. I
> switched to "df". Also, "text" is no longer default data type, but rather
> "_text_". So, I replaced above with:
>
> <df>_text_</df>
>
> , but still default search not working properly. By the way, when I say "not
> working properly"  I am testing this in solr admin by entering various
> strings like "car" or "title" or "service" and nothing is returned. However,
> when I enter "text:car" or "text:title" or "text:service" data is returned.
> I need the default (i.e., not specifier left of colon) to work.

The df field should be set to whatever you have left of the colon in the
searches that work.  It looks like that is text without the underscores,
so that's what you should set df to.

The schema from the default config for 7.3 may populate the field name
with the underscores, but apparently the schema that you're actually
using isn't populating that field.

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|

Re: Default Searches not working after migrating from Solr 4.7 to 7.3

THADC
Ok this is fixed. the <df>_text_<\df> was not the issue. Certain copyFields
had to be changed from dest="text" to dest="_text_".

this issue is closed. thank you



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html