You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Khalid Galal (JIRA)" <ji...@apache.org> on 2015/02/04 10:46:34 UTC

[jira] [Comment Edited] (SOLR-7070) Issue when using "fl" with dynamic filelds without setting wilcards

    [ https://issues.apache.org/jira/browse/SOLR-7070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14304838#comment-14304838 ] 

Khalid Galal edited comment on SOLR-7070 at 2/4/15 9:45 AM:
------------------------------------------------------------

Thanks "Hoss Man" for your reply.

Actually I have the below configuration of dynamic fileds in my schema,xml file:

<dynamicField name="*_TOTAL_PARTS"  type="long"  indexed="true"  stored="true" />

* My request URLs:
- The below request works on 4.10.3:
http://10.68.20.139:5080/solr-4.10.3/reports_core/select?q=PART_MAN:"BAV99|ROHM"&fl=*_TOTAL_PARTS&wt=json&indent=true

{
  "responseHeader": {
    "status": 0,
    "QTime": 2
  },
  "response": {
    "numFound": 1,
    "start": 0,
    "docs": [
      {
        "10638877_TOTAL_PARTS": 1,
        "10638851_TOTAL_PARTS": 13,
        "10639631_TOTAL_PARTS": 1,
        "10638826_TOTAL_PARTS": 1,
        "10638756_TOTAL_PARTS": 2,
        "10638852_TOTAL_PARTS": 2,
        "10638755_TOTAL_PARTS": 2,
        "10639292_TOTAL_PARTS": 2
     }
    ]
  }
}

- While the below request works on 4.6 but doesn't work on 4.10.3:
http://10.68.20.139:5080/solr4.6/reports_core3/select?q=PART_MAN:"BAV99|ROHM"&fl=1_TOTAL_PARTS&wt=json&indent=true

- Response on 4.6:
{
  "responseHeader": {
    "status": 0,
    "QTime": 7
  },
  "response": {
    "numFound": 1,
    "start": 0,
    "docs": [
      {
        "1": 1,
        "1_TOTAL_PARTS": 1
      }
    ]
  }
}

- Response in 4.10.3
{
  "responseHeader": {
    "status": 0,
    "QTime": 2
  },
  "response": {
    "numFound": 1,
    "start": 0,
    "docs": [
      {
        "1": 1
      }
    ]
  }
}




was (Author: kgalal):
Thanks "Hoss Man" for your reply.

Actually I have the below configuration of dynamic fileds in my schema,xml file:

<dynamicField name="*_TOTAL_PARTS"  type="long"  indexed="true"  stored="true" />

** My request URLs:
* The below request works on 4.10.3:
http://10.68.20.139:5080/solr-4.10.3/reports_core/select?q=PART_MAN:"BAV99|ROHM"&fl=*_TOTAL_PARTS&wt=json&indent=true

{
  "responseHeader": {
    "status": 0,
    "QTime": 2
  },
  "response": {
    "numFound": 1,
    "start": 0,
    "docs": [
      {
        "10638877_TOTAL_PARTS": 1,
        "10638851_TOTAL_PARTS": 13,
        "10639631_TOTAL_PARTS": 1,
        "10638826_TOTAL_PARTS": 1,
        "10638756_TOTAL_PARTS": 2,
        "10638852_TOTAL_PARTS": 2,
        "10638755_TOTAL_PARTS": 2,
        "10639292_TOTAL_PARTS": 2
     }
    ]
  }
}

* While the below request works on 4.6 but doesn't work on 4.10.3:
http://10.68.20.139:5080/solr4.6/reports_core3/select?q=PART_MAN:"BAV99|ROHM"&fl=1_TOTAL_PARTS&wt=json&indent=true

{
  "responseHeader": {
    "status": 0,
    "QTime": 7
  },
  "response": {
    "numFound": 1,
    "start": 0,
    "docs": [
      {
        "1": 1,
        "1_TOTAL_PARTS": 1
      }
    ]
  }
}




> Issue when using "fl" with dynamic filelds without setting wilcards
> -------------------------------------------------------------------
>
>                 Key: SOLR-7070
>                 URL: https://issues.apache.org/jira/browse/SOLR-7070
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.10.3
>            Reporter: Khalid Galal
>              Labels: dynamic, fields
>             Fix For: 4.6
>
>
> Issue when using "fl" with dynamic fields without setting wildcards, such as:
> In solr 4.6, I used to select dynamic fields by exact match, e.g. the below query used to work with me:
> fl=123_PART
> But in solr 4.10.3, the above query doesn't work any more, so I am forced to use a wildcards, such as to be begin with match, e.g. the below query:
> fl=*_PART
> The above query works but returns all dynamic fields that end with "_PART", and that results in bad performance as our dynamic fields are stored.
> Is there any way to be able to select a dynamic field exactly like in version 4.6?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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