Note that there are some explanatory texts on larger screens.

plurals
  1. POSolrj query two date exception
    primarykey
    data
    text
    <p>I use <code>Apache Solr 4</code> and I new at <code>Solr</code>, I want to add <code>last_modified</code> by <code>date chooser</code>, but I get exception when I add some document which have own <code>last_modified</code>. This exception I get. org.apache.solr.common.SolrException: Bad Request</p> <p>I add field <code>shema.xml</code> <code>las_date</code>, but now i can't query range two date like this <strong>attr_las_date:[2013-01-00T20:00:00Z TO 2013-01-10T19:59:59Z]</strong> , because in <code>schema.xml</code> <em>attr_</em>* format is <code>String</code></p> <pre><code>public static void indexFilesSolrCell(String fileName, String solrId,String fileAuthor, String fileDate,String fileDescription, String fileTitle) throws IOException, SolrServerException { String urlString = "http://localhost:8983/solr"; SolrServer solr = new CommonsHttpSolrServer(urlString); ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update/extract"); up.addFile(new File(fileName)); up.setParam("literal.id", solrId.replaceAll("\\s","").replaceAll("\\(","").replaceAll("\\)", "")); up.setParam("literal.url", fileName); up.setParam("literal.name", solrId); up.setParam("literal.content_type",solrId); up.setParam("uprefix", "attr_"); up.setParam("fmap.content", "content"); up.setParam("literal.owner",fileAuthor); up.setParam("literal.last_modified", fileDate); up.setParam("literal.description", fileDescription); up.setParam("literal.title", fileTitle); up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true); solr.request(up); QueryResponse rsp = solr.query(new SolrQuery("*:*")); } </code></pre> <p>How I add the date to documents? </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload