specifying highlight fields at runtime in elasticsearch Nest library - nest

in NEST library of ElasticSearch for NET, we can highlight on somefields.staticly we can determine highlightin fields in code. but in this case we cannot specify highligh terms at Runtime to allow user to select highlighting fields.
How can i specify highlighting fields at runtime?
Thanks.

Related

Sublime Text 3 cannot parse symbols from vuejs

In Sublime Text, I'm used to accessing function names through the # symbol list. However, when using a project established from vue-templates, all the function names and data attributes in .vue files do not appear in this list.
This makes navigating .vue files tedious. I have installed all vue-related Sublime packages but none of them seem to fix this.
How can I get symbol indexing working properly with Vue files? Or, do you have any experience with other text editors that do this properly?
The symbol list in Sublime (visible via Goto > Goto Symbol... or Goto > Goto Symbol in Project...) is controlled primarily by the syntax definition for the language in question and secondarily by configuration metadata that tells Sublime what parts of the syntax are actually symbols that should be displayed in the symbol list.
In general:
Sublime runs an indexer over all of the files that are currently in your project
The indexer uses the rules in the syntax definition to break up the text into various scopes that describe the purpose of each bit of text (e.g. "This is a string", "this is a method call", etc)
A preferences file contains rules that indicate what scopes are considered symbols, both for the current file as well as project wide
The two parts of this need to work hand in hand in order for the symbol lists to populate correctly (as Sublime can't guess on its own), and both parts should be provided by the package or packages that are providing Vue support to Sublime.
The best course of action would be to raise an issue with the developers for the Vue package that's providing the Syntax definition. It's possible that the simple inclusion of an appropriate Symbol List.tmPreferences file by the syntax author would be enough to fix the issue.
It's also possible that the symbol list is not fully populated because sublime is still indexing all of the files in the project and so the data is not available yet.
You can check the status of the indexer in recent builds of sublime by selecting Help > Indexing Status... from the menu to see if that's the issue. However unless you have an extremely large set of files this is likely not the issue.

How to Implement org.eclipse.wst.sse.ui.semanticHighlighting

I'm trying to implement content-assist and some custom highlighting as a plugin for Eclipse, after a lot of research I found this eclipse document.
I got content-assist working for XML documents, the problem is the part about SemanticHighlighting, I didn't find any information about how to implement this extension-point and I'm a bit lost. The only info that I found is the XSD for the extension point.
I'm trying to make some customs expressions on XML get a different color Ex:
<span>%%colored_text%%</span>
Where can I get more information about this org.eclipse.wst.sse.ui.semanticHighlighting and how to implement it?
I don't think there's a lot of a documentation on the semantic highlighting for SSE. The document that you found is a little light on details. For an example, the XSL project implemented semantic highlighting using the extension point.
The basic idea behind the semantic highlighting extension point is that when a change occurs, implementors will be asked if it can 'consume' a region of the document. If it can, it will return an array of Positions that can be highlighted by that particular highlighter. It can apply only one style, so it ends up being very specific. For example, you wouldn't be able to say 'color this part of the region blue and this other part of the region red'. You would need two separate highlighters to accomplish that.
The highlighter obtains style information for the highlight by using a preference store that you return from getPreferenceStore(). You'll then need to set up keys that the highlighter will use to look up styles from that preference store. If you use the styleStringKey on the extension point, the only key of importance from the semantic highlighting implementation is the one returned from getEnabledPreferenceKey(). This is kind of the condensed way to declare a style, as it only takes 2 preferences to get going. The semantic highlighting framework knows how the parse the string value returned by the preference store for the styleStringKey into the appropriate style components. Just follow the format as defined on the New Help for Old Friends document that you linked to.
Now, if you want to keep all the style components separate, the other get*PreferenceKey() methods become important. You'll have to define keys for each of them, and then add default values for each of those keys in your preference initializer.
org.eclipse.wst.xsl.ui.internal.preferences.XSLUIPreferenceInitializer has examples of both ways to define these style defaults.

Is it possible to display characters differently from what is stored on disk in Eclipse editor?

We're developing an Eclipse plugin.
When the user types <= I would like to display a left-arrow UTF character ⇐ instead.
The file on disk still needs to contain the original "less than,equals" symbols, because that is what the programming language prescribes.
In other contexts, in the same editor, I might want to display the same character sequence <= as unicode less or equal ≤. This would help the user understand how the compiler interprets the sequence <=, depending on the context. Again, the document (and file) should not be changed, only the way we display it.
What is the easiest way to do this? Note that we're already on xText, so we use the editor provided by xText.
Eclipse text editors normally use an object implementing IDocument (usually also the numerous IDocumentExtensionXX interfaces) often by extending the AbstractDocument class.
This document class provides the text that the editor displays and is updated with the changes the user makes, so it should be able to manage converting between the file and display representations.

What is a good Latex compiler for compiling Requirement Documents?

I'm searching a good Latex compiler for compiling Requirement Documents? Are there any compilers or plugins that support special tags for showing requirements?
You're searching for a package that provides macros and commands for writing documents with a certain structure / content. This has nothing to do with LaTeX compilers.
Usually, you have some template or other specification on how your document should be structured - there is no global, universally used standard on writing requirement documents. Even the definition of what exactly a Requirement Document is may vary. So it is very unlikely that there is a package that provides exactly the functionality you need.
This is a situation where you should write your own macros. You can e.g. define your own environment for a requirement, name it requirement and apply some styling and configuration on it. Consult Customizing LaTeX for a description on how to define own commands and environments.
If you plan to write multiple documents based on your macros, you may want to move them into a package. You can then use the package in multiple documents.

What is the naming convention used when mapping a pdf template within nested repeat fields?

According to the instructions on: http://wiki.orbeon.com/forms/doc/user-guide/form-builder-user-guide/pdf-generation#TOC-Multi-line-text
It states to map fields from orbeon forms to pdf templates (my-section$my-field). This works perfectly. When using repeats we researched on how this naming convention changes slightly to include a "$1"... (ie: my-section$my-field$1, my-section$my-field$2).
We have a form that has a nested repeat and have tried to apply the same naming convention and it has not worked. We have also experimented with other combinations to no success.
Please let us know how to map fields from nested repeats to pdf templates.
Thanks!
The syntax you mention, using $1, $2… at the end of the field id, looks correct to me. You can see this used in the DMV 14 example; you'll find it linked from the examples home page, and you can look at the source for that example on GitHub. If you open the PDF with Acrobat, you can see the ids, which follow the syntax you mentioned: