lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Rafalovitch <arafa...@gmail.com>
Subject Re: Get docs with same value in one other field ?
Date Wed, 22 Feb 2017 23:07:34 GMT
A thousand of IDs could be painful to send and perhaps to run against.

At minimum, look into splitting your query into multiple variables (so
you could reuse the list in both direct and join query). Look also at
using terms query processor that specializes in the list of IDs. You
may also need to send your ID list as a POST, not GET request to avoid
blowing the URL length.

Regards,
   Alex.
----
http://www.solr-start.com/ - Resources for Solr users, new and experienced


On 22 February 2017 at 17:55, Bruno Mannina <bmannina@free.fr> wrote:
> Just a little more thing, I need to request up to 1000 id's
> Actually I test with 2 or 3 and it takes times (my db is around 100 000 000 docs, 128Go
RAM).
>
> Do you think, it could be OOM error ? if I test with up to 1000 id ?
>
> -----Message d'origine-----
> De : Bruno Mannina [mailto:bmannina@free.fr]
> Envoyé : mercredi 22 février 2017 23:47
> À : solr-user@lucene.apache.org
> Objet : RE: Get docs with same value in one other field ?
>
> Yessss it's perfect !!! it works.
>
> Thanks David & Alexandre !
>
> -----Message d'origine-----
> De : David Hastings [mailto:hastings.recursive@gmail.com]
> Envoyé : mercredi 22 février 2017 23:00
> À : solr-user@lucene.apache.org
> Objet : Re: Get docs with same value in one other field ?
>
> sorry embedded link:
>
> q={!join+from=fid=fid}id:ZZZ
>
> On Wed, Feb 22, 2017 at 4:58 PM, David Hastings < hastings.recursive@gmail.com>
wrote:
>
>> for a reference to some examples:
>>
>> https://wiki.apache.org/solr/Join
>>
>> sor youd want something like:
>>
>> q={!join+from=fid=fid}i
>> <http://localhost:8983/solr/select?q=%7B!join+from=manu_id_s+to=id%7Di
>> pod>
>> d:ZZZ
>>
>> i dont have much experience with this function however
>>
>>
>>
>> On Wed, Feb 22, 2017 at 4:40 PM, Alexandre Rafalovitch
>> <arafalov@gmail.com
>> > wrote:
>>
>>> Sounds like two clauses with the second clause being a JOINT search
>>> where you match by ID and then join on FID.
>>>
>>> Would that work?
>>>
>>> Regards,
>>>    Alex.
>>> ----
>>> http://www.solr-start.com/ - Resources for Solr users, new and
>>> experienced
>>>
>>>
>>> On 22 February 2017 at 16:27, Bruno Mannina <bmannina@free.fr> wrote:
>>> >
>>> >
>>> > Hello all,
>>> >
>>> >
>>> >
>>> > I'm facing a problem that I would like to know if it's possible to
>>> > do it with one request in SOLR.
>>> >
>>> > I have SOLR 5.
>>> >
>>> >
>>> >
>>> > I have docs with several fields but here two are useful for us.
>>> >
>>> > Field 1 : id (unique key)
>>> >
>>> > Field 2 : fid (family Id)
>>> >
>>> >
>>> >
>>> > i.e:
>>> >
>>> >
>>> >
>>> > id:XXX
>>> >
>>> > fid: 1254
>>> >
>>> >
>>> >
>>> > id: YYY
>>> >
>>> > fid: 1254
>>> >
>>> >
>>> >
>>> > id: ZZZ
>>> >
>>> > fid:3698
>>> >
>>> >
>>> >
>>> > id: QQQ
>>> >
>>> > fid: 3698
>>> >
>>> > .
>>> >
>>> >
>>> >
>>> > I request only by id in my project, and I would like in my result
>>> > have
>>> also
>>> > all docs that have the same fid .
>>> >
>>> > i.e. if I request :
>>> >
>>> > ..q=id:ZZZ&.
>>> >
>>> >
>>> >
>>> > I get the docs ZZZ of course but also QQQ because QQQ_fid = ZZZ_fid
>>> >
>>> >
>>> >
>>> > MoreLikeThis, Group, etc. don't answer to my question (but may I
>>> > don't
>>> know
>>> > how to use it to do that)
>>> >
>>> >
>>> >
>>> > Thanks for your help,
>>> >
>>> >
>>> >
>>> > Bruno
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > ---
>>> > L'absence de virus dans ce courrier électronique a été vérifiée par
>>> > le
>>> logiciel antivirus Avast.
>>> > https://www.avast.com/antivirus
>>>
>>
>>
>
>
> ---
> L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel
antivirus Avast.
> https://www.avast.com/antivirus
>

Mime
View raw message