[
https://issues.apache.org/jira/browse/SOLR-1131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12790635#action_12790635
]
Noble Paul edited comment on SOLR-1131 at 12/15/09 10:06 AM:
-------------------------------------------------------------
in FieldType#createFields(SchemaField field, FieldType delegatedType, String
storageVal, boost, String ... externalVals)
{code:java}
String name = field.getName();
Map<String, String> props = new HashMap<String, String>();
//Just set these, delegate everything else to the field type
props.put("indexed", "true");
props.put("stored", "false");
//props.put("omitNorms", "true");
//props.put("tokenized", "false");
if (field.indexed()) {
for (int j = 0; j < externalVals.length; j++) {
//SchemaField is final, as is name, so we need to recreate each time
//put the counter before the separator, b/c dynamic fields can't be
asterisks on both the front and the end of the String
SchemaField sf = SchemaField.create(name + "_" + j +
POLY_FIELD_SEPARATOR + delegatedType.typeName, delegatedType, props);
//QUESTION: should we allow for vectors, etc? Not sure that it makes
sense
results[j] = delegatedType.createField(sf, externalVals[j], boost);
}
}
{code}
It is not clear as to why can't the 'sf' instance be cached and reused?
we can also avoid creating the synthetic field name at query time in
PointField#.getFieldQuery
Why do we have a map for flags why not use a bitset?
was (Author: noble.paul):
in FieldType#createFields(SchemaField field, FieldType delegatedType,
String storageVal, boost, String ... externalVals)
{code:java}
String name = field.getName();
Map<String, String> props = new HashMap<String, String>();
//Just set these, delegate everything else to the field type
props.put("indexed", "true");
props.put("stored", "false");
//props.put("omitNorms", "true");
//props.put("tokenized", "false");
if (field.indexed()) {
for (int j = 0; j < externalVals.length; j++) {
//SchemaField is final, as is name, so we need to recreate each time
//put the counter before the separator, b/c dynamic fields can't be
asterisks on both the front and the end of the String
SchemaField sf = SchemaField.create(name + "_" + j +
POLY_FIELD_SEPARATOR + delegatedType.typeName, delegatedType, props);
//QUESTION: should we allow for vectors, etc? Not sure that it makes
sense
results[j] = delegatedType.createField(sf, externalVals[j], boost);
}
}
{code}
It is not clear as to why can't the 'sf' instance be cached and reused?
Why do we have a map for flags why not use a bitset?
> Allow a single field type to index multiple fields
> --------------------------------------------------
>
> Key: SOLR-1131
> URL: https://issues.apache.org/jira/browse/SOLR-1131
> Project: Solr
> Issue Type: New Feature
> Components: Schema and Analysis
> Reporter: Ryan McKinley
> Assignee: Grant Ingersoll
> Fix For: 1.5
>
> Attachments: SOLR-1131-IndexMultipleFields.patch,
> SOLR-1131.Mattmann.121009.patch.txt, SOLR-1131.Mattmann.121109.patch.txt,
> SOLR-1131.patch, SOLR-1131.patch, SOLR-1131.patch, SOLR-1131.patch,
> SOLR-1131.patch, SOLR-1131.patch, SOLR-1131.patch, SOLR-1131.patch,
> SOLR-1131.patch
>
>
> In a few special cases, it makes sense for a single "field" (the concept) to
> be indexed as a set of Fields (lucene Field). Consider SOLR-773. The
> concept "point" may be best indexed in a variety of ways:
> * geohash (sincle lucene field)
> * lat field, lon field (two double fields)
> * cartesian tiers (a series of fields with tokens to say if it exists within
> that region)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.