lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Toru Matsuzawa <ma...@ccs.co.jp>
Subject Question on use of wildcard to field name at query
Date Thu, 06 Sep 2007 23:57:30 GMT
Hi all.

Wildcard cannot be used for field name by specifying query though storage
in index is possible according to the specification of wildcard by
dynamic field.

I want to use wildcard to specify field name at query.

Please teach something a good idea.

The following images.

--document
<add>
 <doc>
   <field name="id">0</feild>
   <field name="name00">hoge hoge</field>
   <field name="name01">hogesaru</field>
   <field name="name02">saru</field>
   <field name="name03">saru saru</field>
 </doc>
 <doc>
   <field name="id">1</feild>
   <field name="name04">hage hage</field>
   <field name="name10">hagesaru</field>
   <field name="name12">hoge</field>
 </doc>
</add>

--schema.xml
  <dynamicField name="name*" type="text_ws" indexed="true" stored="true"/>

--result of query
/select/?q=name0?:hoge
 result:doc 0

/select/?q=name*:hoge
result:doc 0
       doc 1

/select/?q=name1?:hoge
result:doc 1

Thanks,

-- 
Toru Matsuzawa



Mime
View raw message