question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unconfigured field _index_preview in server logs

See original GitHub issue

NEST/Elasticsearch.Net version: NEST 7.14.1

Elasticsearch version: 7.14.0

.NET runtime version: net5.0

Operating system version: Windows 10

Description of the problem including expected versus actual behavior: I have a multi field index with a prefixed textfield. In the server logs I see the following message very often:

[WARN ][o.e.i.s.IndexShard       ] no index mapper found for field: [descriptions.prefix._index_prefix] returning default postings format

I don’t see any way to solve this warning.

Steps to reproduce: Execute the following test

[Fact]
public async Task TestRaw()
{
    var indexName = $"{ Guid.NewGuid()}";
    var connectionPool = new SingleNodeConnectionPool(new Uri("http://localhost:9200"));

    var connectionSettings = new ConnectionSettings(connectionPool)
        .DefaultMappingFor<ElasticTestIndexEntry>(m => m
            .IndexName(indexName)
        )
        .EnableDebugMode()
        .ThrowExceptions()
        //.DisableDirectStreaming()
        ;

    var client = new ElasticClient(connectionSettings);

    try
    {
        await client.Indices.CreateAsync(indexName, c => c
            .Map<ElasticTestIndexEntry>(m => m
                .AutoMap()
                .Properties(p => p
                    .Text(t => t
                        .Name(n => n.Descriptions)
                        .Fields(f => f
                            .Text(tt => tt
                                .Name("prefix")
                                .IndexPrefixes(pp => pp)
                            )
                        )
                    )
                )
            )
        );

        var bulkEntry = new BulkDescriptor();
        bulkEntry.Refresh(Refresh.WaitFor);
        bulkEntry.Index<ElasticTestIndexEntry>(i => i.Document(new ElasticTestIndexEntry() 
        {
            Descriptions = new List<string>()
            { 
                "abc def",
            },
        }));
        var bulkResponse = await client.BulkAsync(bulkEntry);
        bulkResponse.ItemsWithErrors.Should().BeEmpty();
    }
    finally
    {
        await client.Indices.DeleteAsync(indexName);
    }
}

public class ElasticTestIndexEntry
{
    public List<string> Descriptions { get; set; }
}

Then you have the warning in the server logs.

Expected behavior The nest configuration configures the index correct so that no warning is in the log.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
stevejgordoncommented, Aug 16, 2021

Hi @MartinDemberger. At a first glance, the generated mapping looks okay to me. I’m awaiting some input from colleagues to see if there’s something specific about this case we need to be aware of.

0reactions
stevejgordoncommented, Sep 6, 2021

Closing as I believe this has been answered.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Default Log File Settings for Web Sites <logFile>
How to edit the default logging settings for a server. Open Internet Information Services (IIS) Manager: If you are using Windows Server 2012...
Read more >
Managing authorization server log files
From the top menu, select Secure Web Settings > Manage > Authorization Server. Select the instance of interest. Select Manage > Logging.
Read more >
7 Managing Oracle HTTP Server Logs
Oracle HTTP Server generates log files containing messages that record all types of events, ... Use %i to specify the client identity field...
Read more >
Configure Logging in IIS
Open IIS Manager. For Windows Server 2012, on the Start page click the Server Manager tile, and then click OK. In Server Manager,...
Read more >
Service Edge Server Logs - ClickSoftware Wiki Cloud
Service Edge Server Logs. This page describes the logs that the Service Edge server generates, such as the Centralized Log and the Incoming...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found