Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude property from being indexed

I have created below object which will be mapped to ElasticSearch type. I would like to exclude the UnivId property from being indexed:

[ElasticType(Name = "Type1")]
public class Type1
{
    // To be ignored
    public string UnivId { get; set; }

    [ElasticProperty(Name="Id")]
    public int Id { get; set; }

    [ElasticProperty(Name = "descSearch")]
    public string descSearch { get; set; }
}
like image 222
vish.Net Avatar asked Apr 14 '14 15:04

vish.Net


People also ask

How to exclude folder from indexing in Windows 10?

Excluding folder from Indexing Exclude particular folder from indexing by clicking right click. Then go to Advance options and click on indexing option 3. How To Disable Indexing In Windows 10

How to request the server to exclude one or more properties?

To request the server to exclude one or more properties, the REST URL can use the excludeProps parameter. For example, to exclude location, created, updated and ownerId, the URL would look as shown below:

How do I exclude a specific property from a REST URL?

To request the server to exclude one or more properties, the REST URL can use the excludeProps parameter. For example, to exclude location, created, updated and ownerId, the URL would look as shown below: /data/Person?excludeProps=location,created,updated,ownerId

How do I change the default indexing settings in Windows Search?

Windows Search only indexes a few locations by default (see screenshot below); all others have to be included specifically in the index. To edit the settings just start typing “indexing options” or “search” in the Start Menu search box and click the relevant result: 1. Disable/Updating Indexing In Windows


Video Answer


1 Answers

You should be able to set the OptOut value of the ElasticProperty attribute, like the following:

 [ElasticProperty(OptOut = true)]
 public string UnivId { get; set; }
like image 151
Paige Cook Avatar answered Oct 13 '22 01:10

Paige Cook