Hi,

I am facing some issue with dynamic fields. I have 2 fields (UID and ID) on
which I want to do whole word search only.. I made those 2 fields to be of
type 'string'.

<field name="uid" type="string" indexed="true" stored="true"/> 

I also have a dynamic field with textgen field type as below

<dynamicField name="*" type="textgen"  indexed="true"  stored="true"
multiValued="true" /> 

This dynamic field seems to capture all the data including the data from UID
field.. Now my issue is that I am having a copyfield called Text which I am
using to copy all the necessary static fields + all dynamic fields ( seems
like UID is also getting copied since I have used * for dynamic fields) in
to that Text field. This text field is of field type Textgen and hence it
has all kinds of analyzers implemented in it...


Now my questions is that, Is there a way for me to avoid UID and ID to be
copied in to this Text field? I want to copy all other fields (including
dynamic fields) but not ID and UID.



My schema file looks like below,

<field name="text" type="textgen" indexed="true" stored="false"
multiValued="true" /> 

<field name="text_rev" type="text_rev" indexed="true" stored="false"
multiValued="true" /> 

<field name="id" type="string" indexed="true" stored="true"/><!-- this will
be Object ID -->
<field name="uid" type="string" indexed="true" stored="true"/>  <!-- this
will be repository id + object type code +  Object Id -->
<field name="name" type="textgen" indexed="true" stored="true"/> <!-- this
will be Object Name -->
<field name="name_spell" type="string" indexed="true" stored="true"/> <!--
this will be Object Name -->

<field name="type" type="textgen" indexed="true" stored="true"/> <!-- this
will be Object Type display text -->
<field name="path" type="path" indexed="true" stored="true"/> <!-- this will
be Path. Type path need special tokenizer -->
<field name="repository" type="textgen" indexed="true" stored="true"/> <!--
this will be Repository Name -->
<field name="lastupdateddate" type="date" indexed="true" stored="true"/>
<!-- this will be LastUpdatedDate -->

<field name="relationship" type="textgen" indexed="true" stored="true"
multiValued="true" />   <!-- this will be RelationshipType display text -->
<field name="related_name" type="textgen" indexed="true" stored="true"
multiValued="true"/>  <!-- this will be Object2Name -->
<field name="related_type" type="textgen" indexed="true" stored="true"
multiValued="true"/> <!-- this will be Object2 type display text -->
<field name="related_id" type="integer" indexed="true" stored="true"
multiValued="true" /> <!-- this will be Object2Id -->
<field name="related_uid" type="string" indexed="true" stored="true"
multiValued="true" /> <!-- this will be Object2RepositoryId + Object2Type
Abbrev +  Object2Id -->

<field name="related_repository" type="textgen" indexed="true" stored="true"
multiValued="true" /> <!-- this will be repository name of
Object2RepositoryId -->
<field name="relationship_repository_id" type="string" indexed="false"
stored="false" multiValued="true" /> <!-- this will be RepositoryId in
BinaryRelationship view -->
<field name="relationship_repository_name" type="textgen" indexed="true"
stored="false" multiValued="true" /> <!-- this will be Repository name in
BinaryRelationship view -->

<dynamicField name="*_notstored" type="textgen" indexed="true"
stored="false" multiValued="true" /> <!-- this will be catch all fields that
need to be indexed but  not stored.  -->
<dynamicField name="*" type="textgen"  indexed="true"  stored="true"
multiValued="true" /> 
<dynamicField name="*Facet" type="string"  indexed="true" 
multiValued="true" stored="false"/> 

<field name="ObjectUID" type="textgen" indexed="false" stored="false"
multiValued="true" />   <!-- this will be RelationshipType display text -->
<field name="Object1UID" type="textgen" indexed="false" stored="false"
multiValued="true" />   <!-- this will be RelationshipType display text -->
<field name="OBJECT1uid" type="textgen" indexed="false" stored="false"
multiValued="true" />   
</fields>

<uniqueKey>uid</uniqueKey>


 <!-- field for the QueryParser to use when an explicit fieldname is absent
-->
 <defaultSearchField>text</defaultSearchField>

<!--  SolrQueryParser configuration: defaultOperator="AND|OR"   --> 
 <solrQueryParser defaultOperator="OR" /> 

<!--  copyField elements copy all text data into default search field  --> 
 <copyField source="*" dest="*Facet" /> 
 <copyField source="*" dest="text" /> 
 <copyField source="relationship" dest="text" />                  
 <copyField source="related_name" dest="text" />        
 <copyField source="related_type" dest="text" />                  
 <copyField source="name" dest="text" />                      
 <copyField source="related_repository" dest="text" />          
 <copyField source="relationship_repository_name" dest="text" />     
 <copyField source="repository" dest="text" />     
 <copyField source="type" dest="text" />      
 <copyField source="name" dest="text_rev" />    
 <copyField source="name" dest="name_spell" />   
</schema>

Thanks,
BB
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Question-on-dynamic-fields-tp904053p904053.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to