lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Commented) (JIRA)" <>
Subject [jira] [Commented] (SOLR-3241) Document boost fail if a field copy omit the norms
Date Wed, 14 Mar 2012 03:25:53 GMT


Robert Muir commented on SOLR-3241:

Perhaps a better fix would be to leave DocumentBuilder exactly as it is today, and instead
change FieldType.createField to (silently) ignore the boost if omitNorms==true for that SchemaField.
if i'm thinking about this right, that would mean the error checking of the SolrInputDocument
(and all it's SolrInputFields) in DocumentBuilder.toDocument would still work as designed
– so you'd get an error if any client or "high level" plugin like an UpdateProcessor tried
to use a field boost on an omitNorms field; but any fields added at a lower level (ie: by
copyField or a poly field) would silently ignore those boosts if they were copied/cloned to
a field where omitNorms==true.

Hoss: this sounds good to me? we can add tests that the basic case is still working. 

The reason the logic was somewhat complicated in DocumentBuilder is because, from the lucene
indexer its easy to detect this case, but:
# As mentioned before, "document boost" is something only in solr now, so the idea was not
to fail just because you had omitNorms field and solr multiplied document boost into field
boosts. But this copyField/polyField is an exception as you mention
# explicit handling was added to DocumentBuilder because its better for Solr to throw an exception
here than rely upon lucene, lucene's exception
is "nastier" in the sense its a lower-level non-aborting exception that will produce a deleted

> Document boost fail if a field copy omit the norms
> --------------------------------------------------
>                 Key: SOLR-3241
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Tomás Fernández Löbbe
>             Fix For: 3.6, 4.0
>         Attachments: SOLR-3241.patch
> After, it is not possible to set a
boost to a field that has the "omitNorms" set to true. This is making Solr's document index-time
boost to fail when a field that doesn't omit norms is copied (with copyField) to a field that
does omit them and document boost is used. For example:
> <field name="author" type="text" indexed="true" stored="false" omitNorms="false"/>
> <field name="author_display" type="string" indexed="true" stored="true" omitNorms="true"/>
> <copyField source="author" dest="author_display"/>
> I'm attaching a possible fix.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message