You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by lukes <ma...@gmail.com> on 2016/08/08 18:48:47 UTC

Newbie Questions

Hi,

   I am new to Lucene and couple of questions. I have worked with SOLR
previously, now trying to work directly with Lucene to get similar
functionality(but without SOLR). Below are my questions, thanks in advance.

1) In SOLR, there is functionality of copyfields, which dynamically copies
one field value to destination field but without actually storing it in
second time. Does Lucene provides anything directly out of the box ? If i
have to implement such feature, then i need to manually copy the value from
1 field and create new field out of it ?

2) How do i create BooleanField (while creating the document) ? And during
query, how do i create clause/query for that field ? 

3) How can i perform filter and query in one call ? I want some fields to
participate in the filter, but not in the score. How can i do that ?  

Really appreciate the help in advance.
Regards, 



--
View this message in context: http://lucene.472066.n3.nabble.com/Newbie-Questions-tp4290816.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Newbie Questions

Posted by lukes <ma...@gmail.com>.
Thanks Shawn. 

Regards.



--
View this message in context: http://lucene.472066.n3.nabble.com/Re-Newbie-Questions-tp4290827p4290830.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Newbie Questions

Posted by Shawn Heisey <ap...@elyograg.org>.
On 8/8/2016 12:48 PM, lukes wrote:
> 1) In SOLR, there is functionality of copyfields, which dynamically
> copies one field value to destination field but without actually
> storing it in second time. Does Lucene provides anything directly out
> of the box ? If i have to implement such feature, then i need to
> manually copy the value from 1 field and create new field out of it ?

I'm rather clueless about writing Lucene code, so I have no idea on your
other two questions.  I do know a little about Solr, so I will tackle
this one.

Where did you get the idea that the info is not stored a second time
when copyField is used in Solr?  This is not correct.

All copyField does is copy the input value of the source field to the
input value of the destination field.  Once the copyField is done by
Solr, there is no link of any kind in the Lucene index between the
source and destination fields.  Solr behaves exactly as it would if you
didn't have copyField and sent the same information twice -- once in the
source field and once in the destination field.

If the destination field is stored, then the data gets stored,
regardless of whether the source is also stored.  If the destination
field is indexed, then the info is indexed according to the fieldType on
the destination field.  Same with docValues, and any other setting that
fields can use.

Thanks,
Shawn


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org