Re: UniqueKey filed length exceeds
Thanks for u r reply Erick, (Here my use case is -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.
Re: UniqueKey filed length exceeds
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 -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.
Re: UniqueKey filed length exceeds
: if you'd like to make a query like this you need to escape the : so : something like or use the term QParser, which was created for the explicit purpose of never needing to worry about escaping terms in your index... q={!term f=id}2009-11-04:13:51:07.348184 -Hoss
UniqueKey filed length exceeds
I have defined time stamp as unique key but when i trying to search with the same it throws error any other alternate for StrField coz i can't increase the length of it or can't we apply analyzer for the same? My unique key:-MM-DD 13:54:11.414632 -- View this message in context: http://lucene.472066.n3.nabble.com/UniqueKey-filed-length-exceeds-tp3389759p3389759.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: UniqueKey filed length exceeds
I really don't understand what you're trying to convey. Let's see your schema definition for your unique key. I really wouldn't imagine that fields of that form *could* be anything except string. It's not in the correct format for a Solr date, and it's certainly not a numeric type. If that doesn't make sense, please show us the error (stack trace) you're seeing. But the schema for the field in question is the important part. Best Erick On Mon, Oct 3, 2011 at 9:28 AM, kiran.bodigam kiran.bodi...@gmail.com wrote: I have defined time stamp as unique key but when i trying to search with the same it throws error any other alternate for StrField coz i can't increase the length of it or can't we apply analyzer for the same? My unique key:-MM-DD 13:54:11.414632 -- View this message in context: http://lucene.472066.n3.nabble.com/UniqueKey-filed-length-exceeds-tp3389759p3389759.html Sent from the Solr - User mailing list archive at Nabble.com.