FAQ
It appears if a search field value entered contains a ':' causes some issues
since if I have a field named

a.b.c and the user enters a value of foo the constructed query through the
api generates something like
+a.b.c:foo

If they enter in a value of foo:bar

I get +foo:bar where foo is substituted for the correct fieldname.

What is the best way to deal with this?

Thanks.
--
View this message in context: http://www.nabble.com/Field-names-with-%3A-in-it.-tp19845142p19845142.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

Search Discussions

  • Erick Erickson at Oct 6, 2008 at 8:30 pm
    You have to escape it in a query. And did you mean to title your
    post as field *names*? because I can't imagine how that would
    work. Field *values*, sure....

    See http://lucene.apache.org/java/docs/queryparsersyntax.html,
    search for "escape"
    On Mon, Oct 6, 2008 at 3:54 PM, samd wrote:


    It appears if a search field value entered contains a ':' causes some
    issues
    since if I have a field named

    a.b.c and the user enters a value of foo the constructed query through the
    api generates something like
    +a.b.c:foo

    If they enter in a value of foo:bar

    I get +foo:bar where foo is substituted for the correct fieldname.

    What is the best way to deal with this?

    Thanks.
    --
    View this message in context:
    http://www.nabble.com/Field-names-with-%3A-in-it.-tp19845142p19845142.html
    Sent from the Lucene - Java Users mailing list archive at Nabble.com.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Samd at Oct 6, 2008 at 9:23 pm
    Hello and thanks for the response.

    Yes the title should have been values. I'll take at look at the link you
    provided.

    Thanks again!

    Erick Erickson wrote:
    You have to escape it in a query. And did you mean to title your
    post as field *names*? because I can't imagine how that would
    work. Field *values*, sure....

    See http://lucene.apache.org/java/docs/queryparsersyntax.html,
    search for "escape"
    On Mon, Oct 6, 2008 at 3:54 PM, samd wrote:


    It appears if a search field value entered contains a ':' causes some
    issues
    since if I have a field named

    a.b.c and the user enters a value of foo the constructed query through
    the
    api generates something like
    +a.b.c:foo

    If they enter in a value of foo:bar

    I get +foo:bar where foo is substituted for the correct fieldname.

    What is the best way to deal with this?

    Thanks.
    --
    View this message in context:
    http://www.nabble.com/Field-names-with-%3A-in-it.-tp19845142p19845142.html
    Sent from the Lucene - Java Users mailing list archive at Nabble.com.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
    --
    View this message in context: http://www.nabble.com/Field-names-with-%3A-in-it.-tp19845142p19846712.html
    Sent from the Lucene - Java Users mailing list archive at Nabble.com.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedOct 6, '08 at 7:55p
activeOct 6, '08 at 9:23p
posts3
users2
websitelucene.apache.org

2 users in discussion

Samd: 2 posts Erick Erickson: 1 post

People

Translate

site design / logo © 2022 Grokbase