Skip to content

Instantly share code, notes, and snippets.

Developer Article Template

There's another nice template here: https://docs.google.com/document/d/1IqWjwwNLxNMpUB6Uvw0hNuLKdvv7pWmt9iWINOAytNE/edit#heading=h.w72u5l1q8x8c

Where you see MANDATORY, that means that almost every article we encounter needs this information, and it's often left out of drafts. You should write it or explain it to your tech writer, or else have a conversation with them and convince them that your case is so special that it's actually not mandatory.

Background Information

The goal of this article is to describe how a third party developer would

[Your text here > MANDATORY]

@rbohl
rbohl / insights-explain-output.txt
Last active February 1, 2019 17:08
Search Insights output: search for "test" by Type:User, with the Explain box checked
{"from":0,"size":20,"query":{"bool":{"must":[{"bool":{"must":[{"bool":{"should":[{"bool":{"must":[{"bool":{"should":[{"match":{"comments":{"query":"test","operator":"OR","prefix_length":0,"max_expansions":50,"lenient":false,"auto_generate_synonyms_phrase_query":true,"boost":1.0}}},{"match_phrase_prefix":{"comments":{"query":"test","slop":0,"max_expansions":50,"boost":1.0}}}],"boost":1.0}}],"should":[{"match_phrase":{"comments":{"query":"test","slop":0,"boost":2.0}}}],"boost":1.0}},{"bool":{"must":[{"bool":{"should":[{"match":{"content":{"query":"test","operator":"OR","prefix_length":0,"max_expansions":50,"lenient":false,"auto_generate_synonyms_phrase_query":true,"boost":1.0}}},{"match_phrase_prefix":{"content":{"query":"test","slop":0,"max_expansions":50,"boost":1.0}}}],"boost":1.0}}],"should":[{"match_phrase":{"content":{"query":"test","slop":0,"boost":2.0}}}],"boost":1.0}},{"bool":{"must":[{"match":{"description":{"query":"test","operator":"OR","prefix_length":0,"max_expansions":50,"lenient":false,"auto_gen
package com.liferay.docs.forms.storage;
import java.io.File;
import java.io.IOException;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import com.liferay.counter.kernel.service.CounterLocalService;