That's correct. But your query clause was category_facet:test, and you said category_facet is a "string" type. If you copyField'd category_facet to category_text (a "text" type), then you need to search with category_text:test

        Erik


On Aug 21, 2008, at 8:09 PM, Jake Conk wrote:

I thought if I used <copyField /> to copy my string field to a text
field then I can search for words within it and not limited to the
entire content. Did I misunderstand that?

Thanks,
- Jake

On Thu, Aug 21, 2008 at 5:53 PM, Erik Hatcher
<[EMAIL PROTECTED]> wrote:

On Aug 21, 2008, at 7:33 PM, Jake Conk wrote:

I'm having trouble using the + operator. According to the
documentation if I put that operator in front of any term then it
should find that term anywhere within the field.

Be sure to look at this documentation:
<http://lucene.apache.org/java/2_3_2/queryparsersyntax.html>

Now if I wanted to grow on that and add that the name "test" must be
in the category name I thought I would add the following:


?q=%22Jake%22+AND+category_facet:+test

A couple of things here... + goes in front of the field selector in this
case.  +category_facet:test, but also with AND in there the + is
superfluous. AND automatically makes both sides of it required. Another thing to be careful of - category_facet is likely a "string" field, and thus it can only be queried for exactly the entire content of the field, not
words within it.

The two fields below are both string fields and I'm using copyField to
copy them to text fields:

Then in your example you'll want to be sure to query on the text fields, not
the string ones.

      Erik



Reply via email to