You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Landon Petzoldt (JIRA)" <ji...@apache.org> on 2018/05/01 17:25:00 UTC
[jira] [Created] (SOLR-12300) Unpopulated SolrDocument using Custom
DocTransformer
Landon Petzoldt created SOLR-12300:
--------------------------------------
Summary: Unpopulated SolrDocument using Custom DocTransformer
Key: SOLR-12300
URL: https://issues.apache.org/jira/browse/SOLR-12300
Project: Solr
Issue Type: Bug
Security Level: Public (Default Security Level. Issues are Public)
Affects Versions: 7.2, 7.3
Environment: Microsoft Windows 10 Enterprise
Version 10.0.14393 Build 14393
Reporter: Landon Petzoldt
When attempting to tag more than 2 fields with transformers, the documents' fields are not populated except for the id field. This seems to be specific to Solr 7+ as this was not an issue in Solr 6.4.2. The issue only seems to be present for custom transformers, and the default transformers seem to populate correctly.
Steps for Reproduction in Solr 7.2 or 7.3
# Create Java project and import {{*solr-core*}} and {{*solr-solrj*}} library jars.
# Create classes {{*BlankTransformerFactory*}} and {{*BlankTransformer*}} [see gist|https://gist.github.com/clurdish/8683e56ea1b93978f7027844537a0232]
# Build project and put resulting jar into {{*solr\contrib\plugins*}}
# Create sample solr core {{*testcore*}}
# Add configuration to the core's {{*solrconfig.xml*}} (see below)
# Load sample documents into core (see below)
# (2 fields) Navigate to {{http://localhost:8983/solr/testcore/select?q=*:*&indent=true&fl=Author:[blanktrans],Title:[blanktrans],id,layer}} *_all documents are returned correctly_*
# (3 fields) Navigate to {{http://localhost:8983/solr/testcore/select?q=*:*&indent=true&fl=Author:[blanktrans],Title:[blanktrans],id,layer:[blanktrans]}} *_only id field is returned_*
*{{solrconfig.xml}}*
{quote}...
{{<lib dir="${solr.install.dir:../../../..}/contrib/plugins/" regex=".*\.jar" />}}
...
{{<transformer name="blanktrans" class="debug.solr.plugins.transformers.BlankTransformerFactory" />}}
...{quote}
*{{sample_data.json}}*
{quote}{
"id": "1",
"Title": ["The Big Tree"],
"layer": ["fims"]
},
{
"id": "2",
"Title": ["Far Far Away"],
"layer": ["buildings"]
},
{
"id": "3",
"Title": ["Way Too Long"],
"Author": ["Slim Jim McGee"],
"layer": ["fims"]
},
{
"id": "4",
"Author": ["Rumplestiltskin"],
"layer": ["tasks"]
}{quote}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org