Hi Shawn,

Regarding the terms query parser, is it possible to search for query that
are not in the list?

In the normal OR parameters, I can do something like
http://localhost:8983/solr/collection1/highlight?q=!id:collection1_0001
<http://localhost:8983/solr/collection1/highlight?q=id:collection1_0001> OR
!id:collection1_0002

For this query, all the records will be returned, except for ID 0001 and
0002.

However, I can't find a way that works for this in the terms query parser.

Regards,
Edwin



On 14 April 2016 at 11:20, Zheng Lin Edwin Yeo <edwinye...@gmail.com> wrote:

> Hi Shawn,
>
> Thanks for the reply. It works.
>
> Regards,
> Edwin
>
>
> On 14 April 2016 at 01:40, Shawn Heisey <apa...@elyograg.org> wrote:
>
>> On 4/13/2016 9:25 AM, Zheng Lin Edwin Yeo wrote:
>> > Would like to find out, is there any way to do a multiple value query
>> of a
>> > field that is of type String, besides using the OR parameters?
>> >
>> > Currently, I am using the OR parameters like
>> > http://localhost:8983/solr/collection1/highlight?q=id:collection1_0001
>> OR
>> > id:collection1_0002
>> >
>> > But this will get longer and longer if I were to have many records to
>> > retrieve based on their ID. The fieldType is string, so it is not
>> possible
>> > to do things like sorting, more than or less than.
>> >
>> > I'm using Solr 5.4.0
>>
>> The terms query parser was added in 4.10, and would do what you need:
>>
>>
>> https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-TermsQueryParser
>>
>> Thanks,
>> Shawn
>>
>>
>

Reply via email to