tags:

views:

351

answers:

2

Hi,

In the solr admin (www.example.com:8065/solr/admin/file/?file=schema.xml, my schema.xml looks like:

<field name="unique_id" type="string" indexed="true" stored="true" required="true"/>
<field name="collapse" type="string" indexed="true" stored="true"/>
<field name="roles" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="apptype" type="string" indexed="true" stored="true"/>
<field name="attachmentname" type="string" indexed="true" stored="true"/>
<field name="attachmenttext" type="text" indexed="true" stored="true"/>
<field name="content" type="text" indexed="true" stored="true" termVectors="true"/>
<field name="contentid" type="string" indexed="true" stored="true"/>
<field name="date" type="string" indexed="true" stored="true"/>
<field name="group" type="integer" indexed="true" stored="true"/>
<field name="grouptype" type="string" indexed="true" stored="true"/>
<field name="parentgroup" type="integer" indexed="true" stored="true"/>
<field name="rating" type="string" indexed="true" stored="true"/>
<field name="rawcontent" type="string" indexed="false" stored="true" compressed="true"/>
<field name="section" type="integer" indexed="true" stored="true"/>
<field name="tag" type="text" indexed="true" stored="true" multiValued="true" termVectors="true"/>
<field name="tagkeyword" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="threadstatus" type="string" indexed="true" stored="true"/>
<field name="title" type="text" indexed="true" stored="true" termVectors="true"/>
<field name="titlesort" type="string" indexed="true" stored="true"/>
<field name="type" type="string" indexed="true" stored="true"/>
<field name="url" type="string" indexed="true" stored="true"/>
<field name="user" type="string" indexed="true" stored="true"/>
<field name="userdisplayname" type="string" indexed="true" stored="true"/>
<field name="username" type="string" indexed="true" stored="true"/>
<field name="wiki" type="integer" indexed="true" stored="true"/>
<field name="createdby" type="string" indexed="true" stored="true"/>
<field name="editedby" type="string" indexed="true" stored="true"/>
<field name="thread" type="integer" indexed="true" stored="true"/>
<field name="indexed_at" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>

I have a bunch of content with the word 'test', so I query for it:

:8085/solr/select/?q=test&version=2.2&start=1&rows=10&indent=on

If I add either date or timestamp or indexed_at at the end it doesn't change the results?

:8085/solr/select/?q=test&version=2.2&start=1&rows=10&indent=on&date=2009-08-27T13:15:27.73Z

What could the issue be?

A: 

The colon ':' is a reserved character in URIs. Try encoding the date parameter.

Matthias
A: 

The date clause of your query is not with the q parameter. The request should be: ?q=test+date:"2009-08-27T13:15:27.73Z"

Also, your date field should be of type "date" for this query to work.

Pascal Dimassimo