Using copyFields

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

Using copyFields

Sharmadha
Following solr tutorial ,
https://lucene.apache.org/solr/guide/7_7/solr-tutorial.html#create-a-catchall-copy-field
,without adding copyField with src = "*" and dest = "_text_" , I created my
own field named "cfield1" of type text_general and added a copyField with
src = "*" and dest = "cfield1". Posted the films data. After this , on
typing "comedy" in query field , the query doesn't fetch results.

What is special about "_text_" field and what is that specific definition ?
I created cfield same as _text_ (i.e) stored=false , index = true ,
multivalued = true.



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

Re: Using copyFields

Jörn Franke
What do you mean does not fetch results? It returns the found documents, but not the text content? In this case you need to store the field.

Is comedy a stop word defined by you?

> Am 28.03.2019 um 13:03 schrieb Sharmadha <[hidden email]>:
>
> Following solr tutorial ,
> https://lucene.apache.org/solr/guide/7_7/solr-tutorial.html#create-a-catchall-copy-field
> ,without adding copyField with src = "*" and dest = "_text_" , I created my
> own field named "cfield1" of type text_general and added a copyField with
> src = "*" and dest = "cfield1". Posted the films data. After this , on
> typing "comedy" in query field , the query doesn't fetch results.
>
> What is special about "_text_" field and what is that specific definition ?
> I created cfield same as _text_ (i.e) stored=false , index = true ,
> multivalued = true.
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Reply | Threaded
Open this post in threaded view
|

Re: Using copyFields

Sharmadha
As mentioned in
https://lucene.apache.org/solr/guide/7_7/solr-tutorial.html#create-a-catchall-copy-field
, instead of having a copyField on src="*" ,dest ="_text_" , I added a
copyField with src="*" ,dest ="cfield".

when I did copyField on src="*" ,dest ="_text_" , on firing query=comedy ,
it listed all docs wherever there was comedy.

But when I did copyField on src="*" ,dest ="cfield" ,  on firing
query=comedy  , I don't see anything fetched. numfound is 0.

Can you please let me know what I am missing ?


>> What do you mean does not fetch results? It returns the found documents,
>> but not the text content? In this case you need to store the field.
 numfound is 0. No docs are returned.

>> Is comedy a stop word defined by you?
No , its just a text in the document.





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

Re: Using copyFields

Toke Eskildsen-2
In reply to this post by Sharmadha
On Thu, 2019-03-28 at 05:03 -0700, Sharmadha wrote:
> I created my own field named "cfield1" of type text_general and added
> a copyField with src = "*" and dest = "cfield1". Posted the films
> data. After this , on typing "comedy" in query field , the query
> doesn't fetch results.

You need to tell Solr which fields it should search: df=cfield


https://lucene.apache.org/solr/guide/7_7/the-standard-query-parser.html#standard-query-parser-parameters

- Toke Eskildsen, Royal Danish Library


Reply | Threaded
Open this post in threaded view
|

Re: Using copyFields

Sharmadha
Thanks. Adding default field in solrconfig.xml worked.



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