lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Weiss <>
Subject DateRangeField Query throws NPE
Date Mon, 03 Aug 2015 23:28:35 GMT
Hi everyone,

I'm running into a trouble building a query with DateRangeField.  Web-based queries work fine,
but this code throws an NPE:

dateRangeQuery = dateRangeField.getRangeQuery(null, SidxS.getSchema().getField("sku_history.date_range"),
start_date_str, end_date_str, true, true);

ERROR - 2015-08-03 23:07:10.122; [   instock_dev] org.apache.solr.common.SolrException;
at org.apache.solr.schema.AbstractSpatialFieldType.getStrategy(
at org.apache.solr.schema.AbstractSpatialFieldType.getQueryFromSpatialArgs(
at org.apache.solr.schema.DateRangeField.getRangeQuery(
at com.wgsn.ginger.stockStatusQuery.getFilterCollector(
at org.apache.solr.handler.component.QueryComponent.process(
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(
at org.apache.solr.handler.RequestHandlerBase.handleRequest(
at org.apache.solr.core.SolrCore.execute(
Caused by: java.lang.NullPointerException
at org.apache.solr.schema.AbstractSpatialPrefixTreeFieldType.newSpatialStrategy(
at org.apache.solr.schema.AbstractSpatialPrefixTreeFieldType.newSpatialStrategy(
at org.apache.solr.schema.AbstractSpatialFieldType$
at org.apache.solr.schema.AbstractSpatialFieldType$
... 38 more

That line 117 seems to be some logging happening in that class, which is probably unnecessary
to begin with:

strat: "+strat+" maxLevels: "+ grid<>.getMaxLevels<>());//TODO
output maxDetailKm

No idea which variable is returning null, kinda guessing it's the grid.getMaxLevels() since
I don't see this being initialized by any prior methods in this chain.  Is this just a bug
or am I using it wrong?  I'm trying to wrap this query together with two other queries but
I can't even get the Query object back.



WGSN is a global foresight business. Our experts provide deep insight and analysis of consumer,
fashion and design trends. We inspire our clients to plan and trade their range with unparalleled
confidence and accuracy. Together, we Create Tomorrow.

WGSN<> is part of WGSN Limited, comprising of market-leading products
including<>, WGSN Lifestyle & Interiors<>,
WGSN INstock<>, WGSN StyleTrial<>
and WGSN Mindset<>, our bespoke consultancy

The information in or attached to this email is confidential and may be legally privileged.
If you are not the intended recipient of this message, any use, disclosure, copying, distribution
or any action taken in reliance on it is prohibited and may be unlawful. If you have received
this message in error, please notify the sender immediately by return email and delete this
message and any copies from your computer and network. WGSN does not warrant that this email
and any attachments are free from viruses and accepts no liability for any loss resulting
from infected email transmissions.

WGSN reserves the right to monitor all email through its networks. Any views expressed may
be those of the originator and not necessarily of WGSN. WGSN is powered by Top Right Group<>,
which transforms knowledge businesses to deliver exceptional performance.

Please be advised all phone calls may be recorded for training and quality purposes and by
accepting and/or making calls from and/or to us you acknowledge and agree to calls being recorded.

WGSN Limited, Company number 4858491

registered address:

Top Right Group Limited, The Prow, 1 Wilder Walk, London W1B 5AP

WGSN Inc., tax ID 04-3851246, registered office c/o National Registered Agents, Inc., 160
Greentree Drive, Suite 101, Dover DE 19904, United States

4C Serviços de Informação Ltda., CNPJ/MF (Taxpayer's Register): 15.536.968/0001-04, Address:
Avenida Nove de Julho, 5966, Loja, CEP 01406-200, Jardim Europa, São Paulo

4C Business Information Consulting (Shanghai) Co., Ltd, 富新商务信息咨询(上海)有限公司,
registered address Unit 4810/4811, 48/F Tower 1, Grand Gateway, 1 Hong Qiao Road, Xuhui District,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message