It looks like your query is getting parsed as a field and a value

field: 2009-11-04
value: 13:51:07.34814

if you'd like to make a query like this you need to escape the : so
something like

2009-11-04\:13\:51\:07.348184

See the following link for more information

http://lucene.apache.org/java/2_4_0/queryparsersyntax.html#Escaping%20Special%20Characters


On Tue, Oct 4, 2011 at 3:59 AM, kiran.bodigam <kiran.bodi...@gmail.com> wrote:
>  Thanks for u r reply  Erick,
>
> (Here my use case is YYYY-MM-DD 13:54:11.414632 needs to be unique key)
>
> when  i trying to search the data for
> http://localhost:8080/solr/select/?q=2009-11-04:13:51:07.348184
>  it throws following error,
>
> though i change my schema to textfield i am getting following error
>
>  <fieldType name="string" class="solr.TextField" sortMissingLast="true"
> omitNorms="true"  />
>
> kindly check my stack trace
>
> SEVERE: org.apache.solr.common.SolrException: undefined field 2009-11-04
>        at
> org.apache.solr.schema.IndexSchema.getDynamicFieldType(IndexSchema.java:1254)
>        at
> org.apache.solr.schema.IndexSchema$SolrQueryAnalyzer.getAnalyzer(IndexSchema.java:410)
>        at
> org.apache.solr.schema.IndexSchema$SolrIndexAnalyzer.reusableTokenStream(IndexSchema.java:385)
>        at
> org.apache.lucene.queryParser.QueryParser.getFieldQuery(QueryParser.java:574)
>        at
> org.apache.solr.search.SolrQueryParser.getFieldQuery(SolrQueryParser.java:158)
>        at 
> org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1421)
>        at 
> org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1309)
>        at 
> org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1237)
>        at
> org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1226)
>        at 
> org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:206)
>        at 
> org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:80)
>        at org.apache.solr.search.QParser.getQuery(QParser.java:142)
>        at
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:84)
>        at
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:173)
>        at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
>        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1360)
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/UniqueKey-filed-length-exceeds-tp3389759p3392432.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to