Tag Archives: Index

Create an index for each Cloudwatch logstream

  1. Go to the AWS Lambda function and search your ElasticSearch lambda function associated with your wanted ES instance. The name of the function should start with: LogsToElasticsearch_
  2. Then in this JS file search for a code of line that generated the logging entry to be pushed to an ES index. This should be in a function named as: function transform(payload) {…}
  3. In here search for the line that created the index: var indexName = [ … ]
  4. Change it to the following(NOTICE: The index name must be in lower case):
    var indexName = [
    ‘cwl-‘ + payload.logStream.toLowerCase() + “-” + timestamp.getUTCFullYear(), // year
    (‘0’ + (timestamp.getUTCMonth() + 1)).slice(-2), // month
    (‘0’ + timestamp.getUTCDate()).slice(-2) // day

SharePoint 2013 Search and Search Index Problems

If you find yourself in a situation where your search does not work you have some options:

  1. Do a full crawl
  2. Reset the search index and Do a full crawl
  3. Maybe along the way restart the SharePoint search service and/or the SharePoint timer service
  4. And if none of the above then you have to get creative

In the third option usually you get errors on your search webpart or search results. These errors do not go away and nothing seem to help, like the option one and two above.

One of the last things which you can do before going crazy 🙂 would be to manually empty the configuration cache. You do this in the following way:

  1. Find the the folder named with a GUID which has cache.ini file under the C:\ProgramData\Microsoft\SharePoint\Config
  2. Stop SharePoint Server Search 15 and SharePoint Timer Services
  3. Backup the cache.ini file
  4. Delete all files except the cache.ini file
  5. Edit the cache.ini and make sure it has only 1
  6. Save and Close the file.
  7. Start SharePoint Server Search 15 and SharePoint Timer Services
  8. Start Index Reset from SharePoint Central Administration\Application Management\Manage Service Applications\SearchServiceApplication\Index Reset
  9. You will see your  C:\ProgramData\Microsoft\SharePoint\Config\YourGUID folder will be filled up new .xml files and your cache.ini file will be modified.
  10. Next I run a full search crawl to get some search results.

NOTICE: Do not do this if you are tight on time. Depending on the amount of data in your target environment running a full crawl will take a looon long time. All depends on the server resources and the amount of data in your target environment.

There is also a script from this at codeplex:


Hope this helps someone. I know I have spent enough time with this problem and it is anoying.