I just saw an e-mail from Yonik suggesting escaping the space. I know
so little about Solr that all I can do is parrot Yonik...

Erick

On 8/8/07, Matthew Runo <[EMAIL PROTECTED]> wrote:
>
> OK.
>
> So a followup question..
>
> ?q=department_exact:Apparel%3EMen's%
> 20Apparel*&fq=country_code:US&fq=brand_exact:adidas&fq=hibernated:true
>
> returns 0 results. Note the %20 in there for the space character.
>
> ?q=department_exact:Apparel%
> 3EMen's*&fq=country_code:US&fq=brand_exact:adidas&fq=hibernated:true
> returns several, and the only change is that I've truncated "Men's
> Apparel*" to be "Men's*".
>
> (example department_exacts from this result set below..)
>
> Apparel>Men's Apparel>Sweatshirts>Hooded
> Apparel>Men's Apparel>Shirts>Tank Top>Workout
> Apparel>Men's Apparel>Sweatshirts
> Apparel>Men's Apparel>Sweatshirts
> Apparel>Men's Apparel>Jackets>Windbreaker
>
> ----
>
> Any ideas why "Apparel>Men's*" would work, but "Apparel>Men's
> Apparel*" would not?
>
> +--------------------------------------------------------+
>   | Matthew Runo
>   | Zappos Development
>   | [EMAIL PROTECTED]
>   | 702-943-7833
> +--------------------------------------------------------+
>
>
> On Aug 8, 2007, at 2:42 PM, Yonik Seeley wrote:
>
> > On 8/8/07, Matthew Runo <[EMAIL PROTECTED]> wrote:
> >> I've been using the standard query handler to do searches like
> >>
> >> q=department_exact:"Foo>Bar>Baz>Qux"
> >>
> >> Now, lets assume I have lots of records, with various department
> >> trees...
> >> 1. Foo>Bar>Baz>Qux
> >> 2. Foo>Bar>Baz>Put
> >> 3. Foo>Bar>Something With Spaces>Elese
> >> 4. Foo>Totaly>Different>Tree
> >>
> >> I'd like to get all the products at various levels, and all the
> >> levels below.
> >>
> >> I have a tokenzied department field, and a copyField
> >> department_exact.
> >>
> >> I've been doing searches on the department_exact feild, thinking I
> >> could do this..
> >>
> >> q=department_exact:"Foo>Bar*"
> >
> > A "*" inside quotes is literal.
> > Try
> > q=department_exact:Foo>Bar*
> > Or if ">" is a reserved character, escape it with "\"
> > q=department_exact:Foo\>Bar*
> >
> > If "Bar" is unique (only under Foo), you could use a copyfield to copy
> > it to a regex tokenizer to split on ">" and then do a simple search on
> > "Bar"
> >
> > -Yonik
> >
>
>

Reply via email to