incubator-blur-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Williams <william...@gmail.com>
Subject Re: Blue query for exact match
Date Mon, 30 Dec 2013 10:38:17 GMT
On Monday, December 30, 2013, Naresh Yadav wrote:

> Hi,
>
> I had designed my table like this :
>
> Row1 : Measure=Cost, Period=Nov13, Tag=Tag1, Tag=TagA,  Value=50
> Row2 : Measure=Cost, Period=Nov13, Tag=Tag1, Tag=TagB , Value=20
> Row3 : Measure=Cost, Period=Nov13, Tag=Tag1, Value=210
> Row4 : Measure=Cost, Period=Nov13, Tag=Tag2, Tag=TagA Value=120
>
> I need to two types of queries :
>
> A) Give me all rows which has tag as Tag1
> Query : Tag:Tag1
> Expected Result : Row1, Row2, Row3
>
> B) Give me all rows which has only tag as Tag1, no other tag
> Query : ?
> Expected Result : Row3
>
> Please help me in writing BLUR query for problem B)
>

If the list is a smallish set, you could just negate the tags you don't
want:
Tag:Tag1 -Tag:TagA -Tag:TagB

Otherwise, I reckon you could index them twice, once as text and again as
strings - maybe using sub fields - and query the different fields depending
in the desired behavior?

--tim

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message