[jira] Created: (LUCENE-655) field queries does not work as expected

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (LUCENE-655) field queries does not work as expected

Sebastian Nagel (Jira)
field queries does not work as expected
---------------------------------------

                 Key: LUCENE-655
                 URL: http://issues.apache.org/jira/browse/LUCENE-655
             Project: Lucene - Java
          Issue Type: Bug
          Components: Search
    Affects Versions: 1.9
         Environment: tomcat 5.5.17
jdk 1.5.x
            Reporter: Sebastian Wiemer


Hi folks,

i have some trouble using the field queries.

I create documents similar to the following code example:
(The deprecation usage results of having used 1.4.3 before. Just switched to 1.9.1 to check if the error still occurs)

Document document = new Document();
document.add( Field.Keyword( "id", project.getId().toString() ) );
document.add( Field.Keyword( "type", ComponentType.PROJECT.toString() ) );
document.add( Field.Text( "name", project.getName() ) );
document.add( Field.Text( "description", project.getDescription() ) );
...

The indexing process works fine. Searching withing 'name' and 'description' returns the correct result.
I have an xml converted version of the resulting document hit. (the xml is generated using the Document.fields() enumeration)

<?xml version="1.0" encoding="UTF-8"?>
<results>
        <document>
                <field name="id" indexed="true" stored="true" vector="false" tokenized="false">3</field>
                <field name="type" indexed="true" stored="true" vector="false" tokenized="false">PROJECT</field>
                <field name="name" indexed="true" stored="true" vector="false" tokenized="true">project 1</field>
                <field name="description" indexed="true" stored="true" vector="false" tokenized="true">this is my first project.</field>
        </document>
</results>

The following query is the problematic one:

id:3
type:PROJECT
+id:3 +type:PROJECT
+(id:3 type:PROJECT)

none of those return a result.

I'm not really sure if this is a bug, or a missusage of the lucene api.
If've tried version 1.4.3 and 1.9.1 so far.

Would be nice to hear from you guys,

greets
Sebastian

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [jira] Created: (LUCENE-655) field queries does not work as expected

Grant Ingersoll
Hi Sebastian,

In the future, please post these types of questions to the user  
list.   From there, people will help you determine if it is a bug or  
not and help you sort out a fix.  The dev list is for people actively  
working on Lucene internals.

What Analyzer are you using?  Are you sure you are using the same  
analyzer when searching and indexing?  Also, are you familiar with  
Luke?  Use that to make sure you index looks like you think it does.

-Grant


On Aug 15, 2006, at 9:54 AM, Sebastian Wiemer (JIRA) wrote:

> field queries does not work as expected
> ---------------------------------------
>
>                  Key: LUCENE-655
>                  URL: http://issues.apache.org/jira/browse/LUCENE-655
>              Project: Lucene - Java
>           Issue Type: Bug
>           Components: Search
>     Affects Versions: 1.9
>          Environment: tomcat 5.5.17
> jdk 1.5.x
>             Reporter: Sebastian Wiemer
>
>
> Hi folks,
>
> i have some trouble using the field queries.
>
> I create documents similar to the following code example:
> (The deprecation usage results of having used 1.4.3 before. Just  
> switched to 1.9.1 to check if the error still occurs)
>
> Document document = new Document();
> document.add( Field.Keyword( "id", project.getId().toString() ) );
> document.add( Field.Keyword( "type", ComponentType.PROJECT.toString
> () ) );
> document.add( Field.Text( "name", project.getName() ) );
> document.add( Field.Text( "description", project.getDescription() ) );
> ...
>
> The indexing process works fine. Searching withing 'name' and  
> 'description' returns the correct result.
> I have an xml converted version of the resulting document hit. (the  
> xml is generated using the Document.fields() enumeration)
>
> <?xml version="1.0" encoding="UTF-8"?>
> <results>
> <document>
> <field name="id" indexed="true" stored="true" vector="false"  
> tokenized="false">3</field>
> <field name="type" indexed="true" stored="true" vector="false"  
> tokenized="false">PROJECT</field>
> <field name="name" indexed="true" stored="true" vector="false"  
> tokenized="true">project 1</field>
> <field name="description" indexed="true" stored="true"  
> vector="false" tokenized="true">this is my first project.</field>
> </document>
> </results>
>
> The following query is the problematic one:
>
> id:3
> type:PROJECT
> +id:3 +type:PROJECT
> +(id:3 type:PROJECT)
>
> none of those return a result.
>
> I'm not really sure if this is a bug, or a missusage of the lucene  
> api.
> If've tried version 1.4.3 and 1.9.1 so far.
>
> Would be nice to hear from you guys,
>
> greets
> Sebastian
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the  
> administrators: http://issues.apache.org/jira/secure/ 
> Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/ 
> software/jira
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

--------------------------
Grant Ingersoll
Sr. Software Engineer
Center for Natural Language Processing
Syracuse University
335 Hinds Hall
Syracuse, NY 13244
http://www.cnlp.org

Voice: 315-443-5484
Skype: grant_ingersoll
Fax: 315-443-6886




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LUCENE-655) field queries does not work as expected

Sebastian Nagel (Jira)
In reply to this post by Sebastian Nagel (Jira)
    [ http://issues.apache.org/jira/browse/LUCENE-655?page=comments#action_12437123 ]
           
Nicolas Lalevée commented on LUCENE-655:
----------------------------------------

It is maybe an issue with your analyzer you are using. Which one are you using when storing your documents ?
And if you do query with the query parser, which analyzer do you use ?

> field queries does not work as expected
> ---------------------------------------
>
>                 Key: LUCENE-655
>                 URL: http://issues.apache.org/jira/browse/LUCENE-655
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>    Affects Versions: 1.9
>         Environment: tomcat 5.5.17
> jdk 1.5.x
>            Reporter: Sebastian Wiemer
>
> Hi folks,
> i have some trouble using the field queries.
> I create documents similar to the following code example:
> (The deprecation usage results of having used 1.4.3 before. Just switched to 1.9.1 to check if the error still occurs)
> Document document = new Document();
> document.add( Field.Keyword( "id", project.getId().toString() ) );
> document.add( Field.Keyword( "type", ComponentType.PROJECT.toString() ) );
> document.add( Field.Text( "name", project.getName() ) );
> document.add( Field.Text( "description", project.getDescription() ) );
> ...
> The indexing process works fine. Searching withing 'name' and 'description' returns the correct result.
> I have an xml converted version of the resulting document hit. (the xml is generated using the Document.fields() enumeration)
> <?xml version="1.0" encoding="UTF-8"?>
> <results>
> <document>
> <field name="id" indexed="true" stored="true" vector="false" tokenized="false">3</field>
> <field name="type" indexed="true" stored="true" vector="false" tokenized="false">PROJECT</field>
> <field name="name" indexed="true" stored="true" vector="false" tokenized="true">project 1</field>
> <field name="description" indexed="true" stored="true" vector="false" tokenized="true">this is my first project.</field>
> </document>
> </results>
> The following query is the problematic one:
> id:3
> type:PROJECT
> +id:3 +type:PROJECT
> +(id:3 type:PROJECT)
> none of those return a result.
> I'm not really sure if this is a bug, or a missusage of the lucene api.
> If've tried version 1.4.3 and 1.9.1 so far.
> Would be nice to hear from you guys,
> greets
> Sebastian

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (LUCENE-655) field queries does not work as expected

Sebastian Nagel (Jira)
In reply to this post by Sebastian Nagel (Jira)

     [ https://issues.apache.org/jira/browse/LUCENE-655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller resolved LUCENE-655.
--------------------------------

    Resolution: Incomplete

> field queries does not work as expected
> ---------------------------------------
>
>                 Key: LUCENE-655
>                 URL: https://issues.apache.org/jira/browse/LUCENE-655
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>    Affects Versions: 1.9
>         Environment: tomcat 5.5.17
> jdk 1.5.x
>            Reporter: Sebastian Wiemer
>            Priority: Minor
>
> Hi folks,
> i have some trouble using the field queries.
> I create documents similar to the following code example:
> (The deprecation usage results of having used 1.4.3 before. Just switched to 1.9.1 to check if the error still occurs)
> Document document = new Document();
> document.add( Field.Keyword( "id", project.getId().toString() ) );
> document.add( Field.Keyword( "type", ComponentType.PROJECT.toString() ) );
> document.add( Field.Text( "name", project.getName() ) );
> document.add( Field.Text( "description", project.getDescription() ) );
> ...
> The indexing process works fine. Searching withing 'name' and 'description' returns the correct result.
> I have an xml converted version of the resulting document hit. (the xml is generated using the Document.fields() enumeration)
> <?xml version="1.0" encoding="UTF-8"?>
> <results>
> <document>
> <field name="id" indexed="true" stored="true" vector="false" tokenized="false">3</field>
> <field name="type" indexed="true" stored="true" vector="false" tokenized="false">PROJECT</field>
> <field name="name" indexed="true" stored="true" vector="false" tokenized="true">project 1</field>
> <field name="description" indexed="true" stored="true" vector="false" tokenized="true">this is my first project.</field>
> </document>
> </results>
> The following query is the problematic one:
> id:3
> type:PROJECT
> +id:3 +type:PROJECT
> +(id:3 type:PROJECT)
> none of those return a result.
> I'm not really sure if this is a bug, or a missusage of the lucene api.
> If've tried version 1.4.3 and 1.9.1 so far.
> Would be nice to hear from you guys,
> greets
> Sebastian

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]