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 Jamie Johnson <je...@gmail.com> on 2015/12/28 05:16:41 UTC

Adding the same field value question

What is the difference of adding a field with the same value twice or
adding it once and boosting the field on add?  Is there a situation where
one approach is preferred?

Jamie

Re: Adding the same field value question

Posted by Jamie Johnson <je...@gmail.com>.
Yes the field is multi valued
On Dec 28, 2015 3:48 PM, "Jack Krupansky" <ja...@gmail.com> wrote:

> Is the field multivalued?
>
> -- Jack Krupansky
>
> On Sun, Dec 27, 2015 at 11:16 PM, Jamie Johnson <je...@gmail.com> wrote:
>
> > What is the difference of adding a field with the same value twice or
> > adding it once and boosting the field on add?  Is there a situation where
> > one approach is preferred?
> >
> > Jamie
> >
>

Re: Adding the same field value question

Posted by Jack Krupansky <ja...@gmail.com>.
Is the field multivalued?

-- Jack Krupansky

On Sun, Dec 27, 2015 at 11:16 PM, Jamie Johnson <je...@gmail.com> wrote:

> What is the difference of adding a field with the same value twice or
> adding it once and boosting the field on add?  Is there a situation where
> one approach is preferred?
>
> Jamie
>

Re: Adding the same field value question

Posted by Binoy Dalal <bi...@gmail.com>.
It will only be the same in a very few number of very well choreographed
cases or complete coincidences.
If you're interested in how this might happen you should take a look at how
lucene matches and scores docs based on your query.
https://lucene.apache.org/core/3_5_0/api/core/org/apache/lucene/search/Similarity.html

On Mon, 28 Dec 2015, 20:01 Jamie Johnson <je...@gmail.com> wrote:

> Thanks, I wasn't sure if adding twice and boosting results in a similar
> thing happening under the hood or not.  Appreciate the response.
>
> Jamie
> On Dec 28, 2015 9:08 AM, "Binoy Dalal" <bi...@gmail.com> wrote:
>
> > There's no benefit in adding the same field twice because that'll just
> > increase the size of your index without providing any real benefits at
> > query time.
> > For increasing the scores, boosting is definitely the way to go.
> >
> > On Mon, 28 Dec 2015, 09:46 Jamie Johnson <je...@gmail.com> wrote:
> >
> > > What is the difference of adding a field with the same value twice or
> > > adding it once and boosting the field on add?  Is there a situation
> where
> > > one approach is preferred?
> > >
> > > Jamie
> > >
> > --
> > Regards,
> > Binoy Dalal
> >
>
-- 
Regards,
Binoy Dalal

Re: Adding the same field value question

Posted by Jamie Johnson <je...@gmail.com>.
Thanks, I wasn't sure if adding twice and boosting results in a similar
thing happening under the hood or not.  Appreciate the response.

Jamie
On Dec 28, 2015 9:08 AM, "Binoy Dalal" <bi...@gmail.com> wrote:

> There's no benefit in adding the same field twice because that'll just
> increase the size of your index without providing any real benefits at
> query time.
> For increasing the scores, boosting is definitely the way to go.
>
> On Mon, 28 Dec 2015, 09:46 Jamie Johnson <je...@gmail.com> wrote:
>
> > What is the difference of adding a field with the same value twice or
> > adding it once and boosting the field on add?  Is there a situation where
> > one approach is preferred?
> >
> > Jamie
> >
> --
> Regards,
> Binoy Dalal
>

Re: Adding the same field value question

Posted by Binoy Dalal <bi...@gmail.com>.
There's no benefit in adding the same field twice because that'll just
increase the size of your index without providing any real benefits at
query time.
For increasing the scores, boosting is definitely the way to go.

On Mon, 28 Dec 2015, 09:46 Jamie Johnson <je...@gmail.com> wrote:

> What is the difference of adding a field with the same value twice or
> adding it once and boosting the field on add?  Is there a situation where
> one approach is preferred?
>
> Jamie
>
-- 
Regards,
Binoy Dalal