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 Aman Tandon <am...@gmail.com> on 2015/10/08 07:29:43 UTC

Exclude documents having same data in two fields

Hi,

Is there a way in solr to remove all those documents from the search
results in which two of the fields, *mapping* and  *title* is the exactly
same.

With Regards
Aman Tandon

Re: Exclude documents having same data in two fields

Posted by Walter Underwood <wu...@wunderwood.org>.
After several days, we finally get the real requirement. It really does waste a lot of time and energy when people won’t tell us that.

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)

> On Oct 10, 2015, at 8:19 AM, Upayavira <uv...@odoko.co.uk> wrote:
> 
> In which case you'd be happy to wait for 30s for it to complete, in
> which case the func or frange function query should be fine.
> 
> Upayavira
> 
> On Fri, Oct 9, 2015, at 05:55 PM, Aman Tandon wrote:
>> Thanks Mikhail the suggestion. I will try that on monday will let you
>> know.
>> 
>> *@*Walter This was just an random requirement to find those fields which
>> are not same and then reindex only those. I can full index but I was
>> wondering if there might some function or something.
>> 
>> With Regards
>> Aman Tandon
>> 
>> On Fri, Oct 9, 2015 at 9:05 PM, Mikhail Khludnev
>> <mkhludnev@griddynamics.com
>>> wrote:
>> 
>>> Aman,
>>> 
>>> You can invoke Terms Component for the filed M, let it returns terms:
>>> {a,c,d,f}
>>> then you invoke it for field T let it return {b,c,f,e},
>>> then you intersect both lists (it's quite romantic if they are kept
>>> ordered), you've got {c,f}
>>> and then you applies filter:
>>> fq=-((+M:c +T:c) (+M:f +T:f))
>>> etc
>>> 
>>> 
>>> On Thu, Oct 8, 2015 at 8:29 AM, Aman Tandon <am...@gmail.com>
>>> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> Is there a way in solr to remove all those documents from the search
>>>> results in which two of the fields, *mapping* and  *title* is the exactly
>>>> same.
>>>> 
>>>> With Regards
>>>> Aman Tandon
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Sincerely yours
>>> Mikhail Khludnev
>>> Principal Engineer,
>>> Grid Dynamics
>>> 
>>> <http://www.griddynamics.com>
>>> <mk...@griddynamics.com>
>>> 


Re: Exclude documents having same data in two fields

Posted by Upayavira <uv...@odoko.co.uk>.
In which case you'd be happy to wait for 30s for it to complete, in
which case the func or frange function query should be fine.

Upayavira

On Fri, Oct 9, 2015, at 05:55 PM, Aman Tandon wrote:
> Thanks Mikhail the suggestion. I will try that on monday will let you
> know.
> 
> *@*Walter This was just an random requirement to find those fields which
> are not same and then reindex only those. I can full index but I was
> wondering if there might some function or something.
> 
> With Regards
> Aman Tandon
> 
> On Fri, Oct 9, 2015 at 9:05 PM, Mikhail Khludnev
> <mkhludnev@griddynamics.com
> > wrote:
> 
> > Aman,
> >
> > You can invoke Terms Component for the filed M, let it returns terms:
> > {a,c,d,f}
> > then you invoke it for field T let it return {b,c,f,e},
> > then you intersect both lists (it's quite romantic if they are kept
> > ordered), you've got {c,f}
> > and then you applies filter:
> > fq=-((+M:c +T:c) (+M:f +T:f))
> > etc
> >
> >
> > On Thu, Oct 8, 2015 at 8:29 AM, Aman Tandon <am...@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > Is there a way in solr to remove all those documents from the search
> > > results in which two of the fields, *mapping* and  *title* is the exactly
> > > same.
> > >
> > > With Regards
> > > Aman Tandon
> > >
> >
> >
> >
> > --
> > Sincerely yours
> > Mikhail Khludnev
> > Principal Engineer,
> > Grid Dynamics
> >
> > <http://www.griddynamics.com>
> > <mk...@griddynamics.com>
> >

Re: Exclude documents having same data in two fields

Posted by Aman Tandon <am...@gmail.com>.
Thanks Mikhail the suggestion. I will try that on monday will let you know.

*@*Walter This was just an random requirement to find those fields which
are not same and then reindex only those. I can full index but I was
wondering if there might some function or something.

With Regards
Aman Tandon

On Fri, Oct 9, 2015 at 9:05 PM, Mikhail Khludnev <mkhludnev@griddynamics.com
> wrote:

> Aman,
>
> You can invoke Terms Component for the filed M, let it returns terms:
> {a,c,d,f}
> then you invoke it for field T let it return {b,c,f,e},
> then you intersect both lists (it's quite romantic if they are kept
> ordered), you've got {c,f}
> and then you applies filter:
> fq=-((+M:c +T:c) (+M:f +T:f))
> etc
>
>
> On Thu, Oct 8, 2015 at 8:29 AM, Aman Tandon <am...@gmail.com>
> wrote:
>
> > Hi,
> >
> > Is there a way in solr to remove all those documents from the search
> > results in which two of the fields, *mapping* and  *title* is the exactly
> > same.
> >
> > With Regards
> > Aman Tandon
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
>
> <http://www.griddynamics.com>
> <mk...@griddynamics.com>
>

Re: Exclude documents having same data in two fields

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Aman,

You can invoke Terms Component for the filed M, let it returns terms:
{a,c,d,f}
then you invoke it for field T let it return {b,c,f,e},
then you intersect both lists (it's quite romantic if they are kept
ordered), you've got {c,f}
and then you applies filter:
fq=-((+M:c +T:c) (+M:f +T:f))
etc


On Thu, Oct 8, 2015 at 8:29 AM, Aman Tandon <am...@gmail.com> wrote:

> Hi,
>
> Is there a way in solr to remove all those documents from the search
> results in which two of the fields, *mapping* and  *title* is the exactly
> same.
>
> With Regards
> Aman Tandon
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mk...@griddynamics.com>

Re: Exclude documents having same data in two fields

Posted by Walter Underwood <wu...@wunderwood.org>.
Please explain why you do not want to use an extra field. That is the only solution that will perform well on your large index.

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)


> On Oct 9, 2015, at 7:47 AM, Aman Tandon <am...@gmail.com> wrote:
> 
> No Susheel, As our index size is 62 GB so it seems hard to find those
> records.
> 
> With Regards
> Aman Tandon
> 
> On Fri, Oct 9, 2015 at 7:30 PM, Susheel Kumar <su...@gmail.com> wrote:
> 
>> Hi Aman,  Did the problem resolved or still having some errors.
>> 
>> Thnx
>> 
>> On Fri, Oct 9, 2015 at 8:28 AM, Aman Tandon <am...@gmail.com>
>> wrote:
>> 
>>> okay Thanks
>>> 
>>> With Regards
>>> Aman Tandon
>>> 
>>> On Fri, Oct 9, 2015 at 4:25 PM, Upayavira <uv...@odoko.co.uk> wrote:
>>> 
>>>> Just beware of performance here. This is fine for smaller indexes, but
>>>> for larger ones won't work so well. It will need to do this calculation
>>>> for every document in your index, thereby undoing all benefits of
>> having
>>>> an inverted index.
>>>> 
>>>> If your index (or resultset) is small enough, it can work, but might
>>>> catch you out later.
>>>> 
>>>> Upayavira
>>>> 
>>>> On Fri, Oct 9, 2015, at 10:59 AM, Aman Tandon wrote:
>>>>> Hi,
>>>>> 
>>>>> I tried to use the same as mentioned in the url
>>>>> <
>>>> 
>>> 
>> http://stackoverflow.com/questions/16258605/query-for-document-that-two-fields-are-equal
>>>>> 
>>>>> .
>>>>> 
>>>>> And I used the description field to check because mapping field
>>>>> is multivalued.
>>>>> 
>>>>> So I add the fq={!frange%20l=0%20u=1}strdist(title,description,edit)
>> in
>>>>> my
>>>>> url, but I am getting this error. As mentioned below. Please take a
>>> look.
>>>>> 
>>>>> *Solr Version 4.8.1*
>>>>> 
>>>>> *Url is*
>>>>> 
>>>> 
>>> 
>> http://localhost:8150/solr/core1/select?q.alt=*:*&fl=big*,title,catid&fq={!frange%20l=0%20u=1}strdist(title,description,edit)&defType=edismax
>>>>> 
>>>>>> <response>
>>>>>> <lst name="responseHeader">
>>>>>> <int name="status">500</int>
>>>>>> <int name="QTime">8</int>
>>>>>> <lst name="params">
>>>>>> <str name="q.alt">*:*</str>
>>>>>> <str name="defType">edismax</str>
>>>>>> <str name="fl">big*,title,catid</str>
>>>>>> <str name="fq">{!frange l=0
>> u=1}strdist(title,description,edit)</str>
>>>>>> </lst>
>>>>>> </lst>
>>>>>> <lst name="error">
>>>>>> <str name="trace">
>>>>>> java.lang.RuntimeException at
>>>>>> 
>>>> 
>>> 
>> org.apache.solr.search.ExtendedDismaxQParser$ExtendedDismaxConfiguration.<init>(ExtendedDismaxQParser.java:1455)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.solr.search.ExtendedDismaxQParser.createConfiguration(ExtendedDismaxQParser.java:239)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.solr.search.ExtendedDismaxQParser.<init>(ExtendedDismaxQParser.java:108)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.solr.search.ExtendedDismaxQParserPlugin.createParser(ExtendedDismaxQParserPlugin.java:37)
>>>>>> at org.apache.solr.search.QParser.getParser(QParser.java:315) at
>>>>>> 
>>>> 
>>> 
>> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:144)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:197)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
>>>>>> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1952) at
>>>>>> 
>>>> 
>>> 
>> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:774)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
>>>>>> at
>>>>>> 
>>>> 
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>>>>> at
>>>>>> 
>>>> 
>>> 
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>>>>> at java.lang.Thread.run(Thread.java:745)
>>>>>> </str>
>>>>>> <int name="code">500</int>
>>>>>> </lst>
>>>>>> </response>
>>>>>> 
>>>>> 
>>>>> With Regards
>>>>> Aman Tandon
>>>>> 
>>>>> On Thu, Oct 8, 2015 at 8:07 PM, Alessandro Benedetti <
>>>>> benedetti.alex85@gmail.com> wrote:
>>>>> 
>>>>>> Hi agree with Nutch,
>>>>>> using the Function Range Query Parser, should do your trick :
>>>>>> 
>>>>>> 
>>>>>> 
>>>> 
>>> 
>> https://lucene.apache.org/solr/5_3_0/solr-core/org/apache/solr/search/FunctionRangeQParserPlugin.html
>>>>>> 
>>>>>> Cheers
>>>>>> 
>>>>>> On 8 October 2015 at 13:31, NutchDev <nu...@gmail.com>
>>> wrote:
>>>>>> 
>>>>>>> Hi Aman,
>>>>>>> 
>>>>>>> Have a look at this , it has query time approach also using Solr
>>>> function
>>>>>>> query,
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>> 
>>> 
>> http://stackoverflow.com/questions/15927893/how-to-check-equality-of-two-solr-fields
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>> 
>>> 
>> http://stackoverflow.com/questions/16258605/query-for-document-that-two-fields-are-equal
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> 
>>>>>> 
>>>> 
>>> 
>> http://lucene.472066.n3.nabble.com/Exclude-documents-having-same-data-in-two-fields-tp4233408p4233489.html
>>>>>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> --------------------------
>>>>>> 
>>>>>> Benedetti Alessandro
>>>>>> Visiting card - http://about.me/alessandro_benedetti
>>>>>> Blog - http://alexbenedetti.blogspot.co.uk
>>>>>> 
>>>>>> "Tyger, tyger burning bright
>>>>>> In the forests of the night,
>>>>>> What immortal hand or eye
>>>>>> Could frame thy fearful symmetry?"
>>>>>> 
>>>>>> William Blake - Songs of Experience -1794 England
>>>>>> 
>>>> 
>>> 
>> 


Re: Exclude documents having same data in two fields

Posted by Aman Tandon <am...@gmail.com>.
No Susheel, As our index size is 62 GB so it seems hard to find those
records.

With Regards
Aman Tandon

On Fri, Oct 9, 2015 at 7:30 PM, Susheel Kumar <su...@gmail.com> wrote:

> Hi Aman,  Did the problem resolved or still having some errors.
>
> Thnx
>
> On Fri, Oct 9, 2015 at 8:28 AM, Aman Tandon <am...@gmail.com>
> wrote:
>
> > okay Thanks
> >
> > With Regards
> > Aman Tandon
> >
> > On Fri, Oct 9, 2015 at 4:25 PM, Upayavira <uv...@odoko.co.uk> wrote:
> >
> > > Just beware of performance here. This is fine for smaller indexes, but
> > > for larger ones won't work so well. It will need to do this calculation
> > > for every document in your index, thereby undoing all benefits of
> having
> > > an inverted index.
> > >
> > > If your index (or resultset) is small enough, it can work, but might
> > > catch you out later.
> > >
> > > Upayavira
> > >
> > > On Fri, Oct 9, 2015, at 10:59 AM, Aman Tandon wrote:
> > > > Hi,
> > > >
> > > > I tried to use the same as mentioned in the url
> > > > <
> > >
> >
> http://stackoverflow.com/questions/16258605/query-for-document-that-two-fields-are-equal
> > > >
> > > > .
> > > >
> > > > And I used the description field to check because mapping field
> > > > is multivalued.
> > > >
> > > > So I add the fq={!frange%20l=0%20u=1}strdist(title,description,edit)
> in
> > > > my
> > > > url, but I am getting this error. As mentioned below. Please take a
> > look.
> > > >
> > > > *Solr Version 4.8.1*
> > > >
> > > > *Url is*
> > > >
> > >
> >
> http://localhost:8150/solr/core1/select?q.alt=*:*&fl=big*,title,catid&fq={!frange%20l=0%20u=1}strdist(title,description,edit)&defType=edismax
> > > >
> > > > > <response>
> > > > > <lst name="responseHeader">
> > > > > <int name="status">500</int>
> > > > > <int name="QTime">8</int>
> > > > > <lst name="params">
> > > > > <str name="q.alt">*:*</str>
> > > > > <str name="defType">edismax</str>
> > > > > <str name="fl">big*,title,catid</str>
> > > > > <str name="fq">{!frange l=0
> u=1}strdist(title,description,edit)</str>
> > > > > </lst>
> > > > > </lst>
> > > > > <lst name="error">
> > > > > <str name="trace">
> > > > > java.lang.RuntimeException at
> > > > >
> > >
> >
> org.apache.solr.search.ExtendedDismaxQParser$ExtendedDismaxConfiguration.<init>(ExtendedDismaxQParser.java:1455)
> > > > > at
> > > > >
> > >
> >
> org.apache.solr.search.ExtendedDismaxQParser.createConfiguration(ExtendedDismaxQParser.java:239)
> > > > > at
> > > > >
> > >
> >
> org.apache.solr.search.ExtendedDismaxQParser.<init>(ExtendedDismaxQParser.java:108)
> > > > > at
> > > > >
> > >
> >
> org.apache.solr.search.ExtendedDismaxQParserPlugin.createParser(ExtendedDismaxQParserPlugin.java:37)
> > > > > at org.apache.solr.search.QParser.getParser(QParser.java:315) at
> > > > >
> > >
> >
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:144)
> > > > > at
> > > > >
> > >
> >
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:197)
> > > > > at
> > > > >
> > >
> >
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
> > > > > at org.apache.solr.core.SolrCore.execute(SolrCore.java:1952) at
> > > > >
> > >
> >
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:774)
> > > > > at
> > > > >
> > >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)
> > > > > at
> > > > >
> > >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
> > > > > at
> > > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> > > > > at
> > > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> > > > > at
> > > > >
> > >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> > > > > at
> > > > >
> > >
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> > > > > at
> > > > >
> > >
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> > > > > at
> > > > >
> > >
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> > > > > at
> > > > >
> > >
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
> > > > > at
> > > > >
> > >
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> > > > > at
> > > > >
> > >
> >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> > > > > at
> > > > >
> > >
> >
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
> > > > > at
> > > > >
> > >
> >
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> > > > > at
> > > > >
> > >
> >
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
> > > > > at
> > > > >
> > >
> >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> > > > > at
> > > > >
> > >
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> > > > > at java.lang.Thread.run(Thread.java:745)
> > > > > </str>
> > > > > <int name="code">500</int>
> > > > > </lst>
> > > > > </response>
> > > > >
> > > >
> > > > With Regards
> > > > Aman Tandon
> > > >
> > > > On Thu, Oct 8, 2015 at 8:07 PM, Alessandro Benedetti <
> > > > benedetti.alex85@gmail.com> wrote:
> > > >
> > > > > Hi agree with Nutch,
> > > > > using the Function Range Query Parser, should do your trick :
> > > > >
> > > > >
> > > > >
> > >
> >
> https://lucene.apache.org/solr/5_3_0/solr-core/org/apache/solr/search/FunctionRangeQParserPlugin.html
> > > > >
> > > > > Cheers
> > > > >
> > > > > On 8 October 2015 at 13:31, NutchDev <nu...@gmail.com>
> > wrote:
> > > > >
> > > > > > Hi Aman,
> > > > > >
> > > > > > Have a look at this , it has query time approach also using Solr
> > > function
> > > > > > query,
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > >
> >
> http://stackoverflow.com/questions/15927893/how-to-check-equality-of-two-solr-fields
> > > > > >
> > > > > >
> > > > >
> > >
> >
> http://stackoverflow.com/questions/16258605/query-for-document-that-two-fields-are-equal
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > View this message in context:
> > > > > >
> > > > >
> > >
> >
> http://lucene.472066.n3.nabble.com/Exclude-documents-having-same-data-in-two-fields-tp4233408p4233489.html
> > > > > > Sent from the Solr - User mailing list archive at Nabble.com.
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > --------------------------
> > > > >
> > > > > Benedetti Alessandro
> > > > > Visiting card - http://about.me/alessandro_benedetti
> > > > > Blog - http://alexbenedetti.blogspot.co.uk
> > > > >
> > > > > "Tyger, tyger burning bright
> > > > > In the forests of the night,
> > > > > What immortal hand or eye
> > > > > Could frame thy fearful symmetry?"
> > > > >
> > > > > William Blake - Songs of Experience -1794 England
> > > > >
> > >
> >
>

Re: Exclude documents having same data in two fields

Posted by Susheel Kumar <su...@gmail.com>.
Hi Aman,  Did the problem resolved or still having some errors.

Thnx

On Fri, Oct 9, 2015 at 8:28 AM, Aman Tandon <am...@gmail.com> wrote:

> okay Thanks
>
> With Regards
> Aman Tandon
>
> On Fri, Oct 9, 2015 at 4:25 PM, Upayavira <uv...@odoko.co.uk> wrote:
>
> > Just beware of performance here. This is fine for smaller indexes, but
> > for larger ones won't work so well. It will need to do this calculation
> > for every document in your index, thereby undoing all benefits of having
> > an inverted index.
> >
> > If your index (or resultset) is small enough, it can work, but might
> > catch you out later.
> >
> > Upayavira
> >
> > On Fri, Oct 9, 2015, at 10:59 AM, Aman Tandon wrote:
> > > Hi,
> > >
> > > I tried to use the same as mentioned in the url
> > > <
> >
> http://stackoverflow.com/questions/16258605/query-for-document-that-two-fields-are-equal
> > >
> > > .
> > >
> > > And I used the description field to check because mapping field
> > > is multivalued.
> > >
> > > So I add the fq={!frange%20l=0%20u=1}strdist(title,description,edit) in
> > > my
> > > url, but I am getting this error. As mentioned below. Please take a
> look.
> > >
> > > *Solr Version 4.8.1*
> > >
> > > *Url is*
> > >
> >
> http://localhost:8150/solr/core1/select?q.alt=*:*&fl=big*,title,catid&fq={!frange%20l=0%20u=1}strdist(title,description,edit)&defType=edismax
> > >
> > > > <response>
> > > > <lst name="responseHeader">
> > > > <int name="status">500</int>
> > > > <int name="QTime">8</int>
> > > > <lst name="params">
> > > > <str name="q.alt">*:*</str>
> > > > <str name="defType">edismax</str>
> > > > <str name="fl">big*,title,catid</str>
> > > > <str name="fq">{!frange l=0 u=1}strdist(title,description,edit)</str>
> > > > </lst>
> > > > </lst>
> > > > <lst name="error">
> > > > <str name="trace">
> > > > java.lang.RuntimeException at
> > > >
> >
> org.apache.solr.search.ExtendedDismaxQParser$ExtendedDismaxConfiguration.<init>(ExtendedDismaxQParser.java:1455)
> > > > at
> > > >
> >
> org.apache.solr.search.ExtendedDismaxQParser.createConfiguration(ExtendedDismaxQParser.java:239)
> > > > at
> > > >
> >
> org.apache.solr.search.ExtendedDismaxQParser.<init>(ExtendedDismaxQParser.java:108)
> > > > at
> > > >
> >
> org.apache.solr.search.ExtendedDismaxQParserPlugin.createParser(ExtendedDismaxQParserPlugin.java:37)
> > > > at org.apache.solr.search.QParser.getParser(QParser.java:315) at
> > > >
> >
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:144)
> > > > at
> > > >
> >
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:197)
> > > > at
> > > >
> >
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
> > > > at org.apache.solr.core.SolrCore.execute(SolrCore.java:1952) at
> > > >
> >
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:774)
> > > > at
> > > >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)
> > > > at
> > > >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
> > > > at
> > > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> > > > at
> > > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> > > > at
> > > >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> > > > at
> > > >
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> > > > at
> > > >
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> > > > at
> > > >
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> > > > at
> > > >
> > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
> > > > at
> > > >
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> > > > at
> > > >
> >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> > > > at
> > > >
> >
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
> > > > at
> > > >
> >
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> > > > at
> > > >
> >
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
> > > > at
> > > >
> >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> > > > at
> > > >
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> > > > at java.lang.Thread.run(Thread.java:745)
> > > > </str>
> > > > <int name="code">500</int>
> > > > </lst>
> > > > </response>
> > > >
> > >
> > > With Regards
> > > Aman Tandon
> > >
> > > On Thu, Oct 8, 2015 at 8:07 PM, Alessandro Benedetti <
> > > benedetti.alex85@gmail.com> wrote:
> > >
> > > > Hi agree with Nutch,
> > > > using the Function Range Query Parser, should do your trick :
> > > >
> > > >
> > > >
> >
> https://lucene.apache.org/solr/5_3_0/solr-core/org/apache/solr/search/FunctionRangeQParserPlugin.html
> > > >
> > > > Cheers
> > > >
> > > > On 8 October 2015 at 13:31, NutchDev <nu...@gmail.com>
> wrote:
> > > >
> > > > > Hi Aman,
> > > > >
> > > > > Have a look at this , it has query time approach also using Solr
> > function
> > > > > query,
> > > > >
> > > > >
> > > > >
> > > >
> >
> http://stackoverflow.com/questions/15927893/how-to-check-equality-of-two-solr-fields
> > > > >
> > > > >
> > > >
> >
> http://stackoverflow.com/questions/16258605/query-for-document-that-two-fields-are-equal
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > View this message in context:
> > > > >
> > > >
> >
> http://lucene.472066.n3.nabble.com/Exclude-documents-having-same-data-in-two-fields-tp4233408p4233489.html
> > > > > Sent from the Solr - User mailing list archive at Nabble.com.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > --------------------------
> > > >
> > > > Benedetti Alessandro
> > > > Visiting card - http://about.me/alessandro_benedetti
> > > > Blog - http://alexbenedetti.blogspot.co.uk
> > > >
> > > > "Tyger, tyger burning bright
> > > > In the forests of the night,
> > > > What immortal hand or eye
> > > > Could frame thy fearful symmetry?"
> > > >
> > > > William Blake - Songs of Experience -1794 England
> > > >
> >
>

Re: Exclude documents having same data in two fields

Posted by Aman Tandon <am...@gmail.com>.
okay Thanks

With Regards
Aman Tandon

On Fri, Oct 9, 2015 at 4:25 PM, Upayavira <uv...@odoko.co.uk> wrote:

> Just beware of performance here. This is fine for smaller indexes, but
> for larger ones won't work so well. It will need to do this calculation
> for every document in your index, thereby undoing all benefits of having
> an inverted index.
>
> If your index (or resultset) is small enough, it can work, but might
> catch you out later.
>
> Upayavira
>
> On Fri, Oct 9, 2015, at 10:59 AM, Aman Tandon wrote:
> > Hi,
> >
> > I tried to use the same as mentioned in the url
> > <
> http://stackoverflow.com/questions/16258605/query-for-document-that-two-fields-are-equal
> >
> > .
> >
> > And I used the description field to check because mapping field
> > is multivalued.
> >
> > So I add the fq={!frange%20l=0%20u=1}strdist(title,description,edit) in
> > my
> > url, but I am getting this error. As mentioned below. Please take a look.
> >
> > *Solr Version 4.8.1*
> >
> > *Url is*
> >
> http://localhost:8150/solr/core1/select?q.alt=*:*&fl=big*,title,catid&fq={!frange%20l=0%20u=1}strdist(title,description,edit)&defType=edismax
> >
> > > <response>
> > > <lst name="responseHeader">
> > > <int name="status">500</int>
> > > <int name="QTime">8</int>
> > > <lst name="params">
> > > <str name="q.alt">*:*</str>
> > > <str name="defType">edismax</str>
> > > <str name="fl">big*,title,catid</str>
> > > <str name="fq">{!frange l=0 u=1}strdist(title,description,edit)</str>
> > > </lst>
> > > </lst>
> > > <lst name="error">
> > > <str name="trace">
> > > java.lang.RuntimeException at
> > >
> org.apache.solr.search.ExtendedDismaxQParser$ExtendedDismaxConfiguration.<init>(ExtendedDismaxQParser.java:1455)
> > > at
> > >
> org.apache.solr.search.ExtendedDismaxQParser.createConfiguration(ExtendedDismaxQParser.java:239)
> > > at
> > >
> org.apache.solr.search.ExtendedDismaxQParser.<init>(ExtendedDismaxQParser.java:108)
> > > at
> > >
> org.apache.solr.search.ExtendedDismaxQParserPlugin.createParser(ExtendedDismaxQParserPlugin.java:37)
> > > at org.apache.solr.search.QParser.getParser(QParser.java:315) at
> > >
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:144)
> > > at
> > >
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:197)
> > > at
> > >
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
> > > at org.apache.solr.core.SolrCore.execute(SolrCore.java:1952) at
> > >
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:774)
> > > at
> > >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)
> > > at
> > >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
> > > at
> > >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> > > at
> > >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> > > at
> > >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> > > at
> > >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> > > at
> > >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> > > at
> > >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> > > at
> > >
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
> > > at
> > >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> > > at
> > >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> > > at
> > >
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
> > > at
> > >
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> > > at
> > >
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
> > > at
> > >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> > > at
> > >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> > > at java.lang.Thread.run(Thread.java:745)
> > > </str>
> > > <int name="code">500</int>
> > > </lst>
> > > </response>
> > >
> >
> > With Regards
> > Aman Tandon
> >
> > On Thu, Oct 8, 2015 at 8:07 PM, Alessandro Benedetti <
> > benedetti.alex85@gmail.com> wrote:
> >
> > > Hi agree with Nutch,
> > > using the Function Range Query Parser, should do your trick :
> > >
> > >
> > >
> https://lucene.apache.org/solr/5_3_0/solr-core/org/apache/solr/search/FunctionRangeQParserPlugin.html
> > >
> > > Cheers
> > >
> > > On 8 October 2015 at 13:31, NutchDev <nu...@gmail.com> wrote:
> > >
> > > > Hi Aman,
> > > >
> > > > Have a look at this , it has query time approach also using Solr
> function
> > > > query,
> > > >
> > > >
> > > >
> > >
> http://stackoverflow.com/questions/15927893/how-to-check-equality-of-two-solr-fields
> > > >
> > > >
> > >
> http://stackoverflow.com/questions/16258605/query-for-document-that-two-fields-are-equal
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> http://lucene.472066.n3.nabble.com/Exclude-documents-having-same-data-in-two-fields-tp4233408p4233489.html
> > > > Sent from the Solr - User mailing list archive at Nabble.com.
> > > >
> > >
> > >
> > >
> > > --
> > > --------------------------
> > >
> > > Benedetti Alessandro
> > > Visiting card - http://about.me/alessandro_benedetti
> > > Blog - http://alexbenedetti.blogspot.co.uk
> > >
> > > "Tyger, tyger burning bright
> > > In the forests of the night,
> > > What immortal hand or eye
> > > Could frame thy fearful symmetry?"
> > >
> > > William Blake - Songs of Experience -1794 England
> > >
>

Re: Exclude documents having same data in two fields

Posted by Upayavira <uv...@odoko.co.uk>.
Just beware of performance here. This is fine for smaller indexes, but
for larger ones won't work so well. It will need to do this calculation
for every document in your index, thereby undoing all benefits of having
an inverted index.

If your index (or resultset) is small enough, it can work, but might
catch you out later.

Upayavira

On Fri, Oct 9, 2015, at 10:59 AM, Aman Tandon wrote:
> Hi,
> 
> I tried to use the same as mentioned in the url
> <http://stackoverflow.com/questions/16258605/query-for-document-that-two-fields-are-equal>
> .
> 
> And I used the description field to check because mapping field
> is multivalued.
> 
> So I add the fq={!frange%20l=0%20u=1}strdist(title,description,edit) in
> my
> url, but I am getting this error. As mentioned below. Please take a look.
> 
> *Solr Version 4.8.1*
> 
> *Url is*
> http://localhost:8150/solr/core1/select?q.alt=*:*&fl=big*,title,catid&fq={!frange%20l=0%20u=1}strdist(title,description,edit)&defType=edismax
> 
> > <response>
> > <lst name="responseHeader">
> > <int name="status">500</int>
> > <int name="QTime">8</int>
> > <lst name="params">
> > <str name="q.alt">*:*</str>
> > <str name="defType">edismax</str>
> > <str name="fl">big*,title,catid</str>
> > <str name="fq">{!frange l=0 u=1}strdist(title,description,edit)</str>
> > </lst>
> > </lst>
> > <lst name="error">
> > <str name="trace">
> > java.lang.RuntimeException at
> > org.apache.solr.search.ExtendedDismaxQParser$ExtendedDismaxConfiguration.<init>(ExtendedDismaxQParser.java:1455)
> > at
> > org.apache.solr.search.ExtendedDismaxQParser.createConfiguration(ExtendedDismaxQParser.java:239)
> > at
> > org.apache.solr.search.ExtendedDismaxQParser.<init>(ExtendedDismaxQParser.java:108)
> > at
> > org.apache.solr.search.ExtendedDismaxQParserPlugin.createParser(ExtendedDismaxQParserPlugin.java:37)
> > at org.apache.solr.search.QParser.getParser(QParser.java:315) at
> > org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:144)
> > at
> > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:197)
> > at
> > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
> > at org.apache.solr.core.SolrCore.execute(SolrCore.java:1952) at
> > org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:774)
> > at
> > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)
> > at
> > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> > at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> > at
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> > at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> > at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> > at
> > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
> > at
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> > at
> > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> > at
> > org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
> > at
> > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> > at
> > org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
> > at
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> > at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> > at java.lang.Thread.run(Thread.java:745)
> > </str>
> > <int name="code">500</int>
> > </lst>
> > </response>
> >
> 
> With Regards
> Aman Tandon
> 
> On Thu, Oct 8, 2015 at 8:07 PM, Alessandro Benedetti <
> benedetti.alex85@gmail.com> wrote:
> 
> > Hi agree with Nutch,
> > using the Function Range Query Parser, should do your trick :
> >
> >
> > https://lucene.apache.org/solr/5_3_0/solr-core/org/apache/solr/search/FunctionRangeQParserPlugin.html
> >
> > Cheers
> >
> > On 8 October 2015 at 13:31, NutchDev <nu...@gmail.com> wrote:
> >
> > > Hi Aman,
> > >
> > > Have a look at this , it has query time approach also using Solr function
> > > query,
> > >
> > >
> > >
> > http://stackoverflow.com/questions/15927893/how-to-check-equality-of-two-solr-fields
> > >
> > >
> > http://stackoverflow.com/questions/16258605/query-for-document-that-two-fields-are-equal
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> > http://lucene.472066.n3.nabble.com/Exclude-documents-having-same-data-in-two-fields-tp4233408p4233489.html
> > > Sent from the Solr - User mailing list archive at Nabble.com.
> > >
> >
> >
> >
> > --
> > --------------------------
> >
> > Benedetti Alessandro
> > Visiting card - http://about.me/alessandro_benedetti
> > Blog - http://alexbenedetti.blogspot.co.uk
> >
> > "Tyger, tyger burning bright
> > In the forests of the night,
> > What immortal hand or eye
> > Could frame thy fearful symmetry?"
> >
> > William Blake - Songs of Experience -1794 England
> >

Re: Exclude documents having same data in two fields

Posted by Aman Tandon <am...@gmail.com>.
Hi,

I tried to use the same as mentioned in the url
<http://stackoverflow.com/questions/16258605/query-for-document-that-two-fields-are-equal>
.

And I used the description field to check because mapping field
is multivalued.

So I add the fq={!frange%20l=0%20u=1}strdist(title,description,edit) in my
url, but I am getting this error. As mentioned below. Please take a look.

*Solr Version 4.8.1*

*Url is*
http://localhost:8150/solr/core1/select?q.alt=*:*&fl=big*,title,catid&fq={!frange%20l=0%20u=1}strdist(title,description,edit)&defType=edismax

> <response>
> <lst name="responseHeader">
> <int name="status">500</int>
> <int name="QTime">8</int>
> <lst name="params">
> <str name="q.alt">*:*</str>
> <str name="defType">edismax</str>
> <str name="fl">big*,title,catid</str>
> <str name="fq">{!frange l=0 u=1}strdist(title,description,edit)</str>
> </lst>
> </lst>
> <lst name="error">
> <str name="trace">
> java.lang.RuntimeException at
> org.apache.solr.search.ExtendedDismaxQParser$ExtendedDismaxConfiguration.<init>(ExtendedDismaxQParser.java:1455)
> at
> org.apache.solr.search.ExtendedDismaxQParser.createConfiguration(ExtendedDismaxQParser.java:239)
> at
> org.apache.solr.search.ExtendedDismaxQParser.<init>(ExtendedDismaxQParser.java:108)
> at
> org.apache.solr.search.ExtendedDismaxQParserPlugin.createParser(ExtendedDismaxQParserPlugin.java:37)
> at org.apache.solr.search.QParser.getParser(QParser.java:315) at
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:144)
> at
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:197)
> at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1952) at
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:774)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> </str>
> <int name="code">500</int>
> </lst>
> </response>
>

With Regards
Aman Tandon

On Thu, Oct 8, 2015 at 8:07 PM, Alessandro Benedetti <
benedetti.alex85@gmail.com> wrote:

> Hi agree with Nutch,
> using the Function Range Query Parser, should do your trick :
>
>
> https://lucene.apache.org/solr/5_3_0/solr-core/org/apache/solr/search/FunctionRangeQParserPlugin.html
>
> Cheers
>
> On 8 October 2015 at 13:31, NutchDev <nu...@gmail.com> wrote:
>
> > Hi Aman,
> >
> > Have a look at this , it has query time approach also using Solr function
> > query,
> >
> >
> >
> http://stackoverflow.com/questions/15927893/how-to-check-equality-of-two-solr-fields
> >
> >
> http://stackoverflow.com/questions/16258605/query-for-document-that-two-fields-are-equal
> >
> >
> >
> > --
> > View this message in context:
> >
> http://lucene.472066.n3.nabble.com/Exclude-documents-having-same-data-in-two-fields-tp4233408p4233489.html
> > Sent from the Solr - User mailing list archive at Nabble.com.
> >
>
>
>
> --
> --------------------------
>
> Benedetti Alessandro
> Visiting card - http://about.me/alessandro_benedetti
> Blog - http://alexbenedetti.blogspot.co.uk
>
> "Tyger, tyger burning bright
> In the forests of the night,
> What immortal hand or eye
> Could frame thy fearful symmetry?"
>
> William Blake - Songs of Experience -1794 England
>

Re: Exclude documents having same data in two fields

Posted by Alessandro Benedetti <be...@gmail.com>.
Hi agree with Nutch,
using the Function Range Query Parser, should do your trick :

https://lucene.apache.org/solr/5_3_0/solr-core/org/apache/solr/search/FunctionRangeQParserPlugin.html

Cheers

On 8 October 2015 at 13:31, NutchDev <nu...@gmail.com> wrote:

> Hi Aman,
>
> Have a look at this , it has query time approach also using Solr function
> query,
>
>
> http://stackoverflow.com/questions/15927893/how-to-check-equality-of-two-solr-fields
>
> http://stackoverflow.com/questions/16258605/query-for-document-that-two-fields-are-equal
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Exclude-documents-having-same-data-in-two-fields-tp4233408p4233489.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
--------------------------

Benedetti Alessandro
Visiting card - http://about.me/alessandro_benedetti
Blog - http://alexbenedetti.blogspot.co.uk

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England

Re: Exclude documents having same data in two fields

Posted by NutchDev <nu...@gmail.com>.
Hi Aman,

Have a look at this , it has query time approach also using Solr function
query,

http://stackoverflow.com/questions/15927893/how-to-check-equality-of-two-solr-fields
http://stackoverflow.com/questions/16258605/query-for-document-that-two-fields-are-equal



--
View this message in context: http://lucene.472066.n3.nabble.com/Exclude-documents-having-same-data-in-two-fields-tp4233408p4233489.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Exclude documents having same data in two fields

Posted by Aman Tandon <am...@gmail.com>.
But I want to find do it at run time without index extra field

With Regards
Aman Tandon

On Thu, Oct 8, 2015 at 11:55 AM, NutchDev <nu...@gmail.com> wrote:

> One option could be creating another boolean field field1_equals_field2 and
> set it to true for documents matching it while indexing. Use this field as
> a
> filter criteria while querying solr.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Exclude-documents-having-same-data-in-two-fields-tp4233408p4233411.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Exclude documents having same data in two fields

Posted by NutchDev <nu...@gmail.com>.
One option could be creating another boolean field field1_equals_field2 and
set it to true for documents matching it while indexing. Use this field as a
filter criteria while querying solr. 



--
View this message in context: http://lucene.472066.n3.nabble.com/Exclude-documents-having-same-data-in-two-fields-tp4233408p4233411.html
Sent from the Solr - User mailing list archive at Nabble.com.