Is there a way to search for elements that don't have a particular tagged value in Enterprise Architect? - enterprise-architect

The model search feature is an excellent tool for finding elements throughout a given project. Is there the ability to search for elements that do not have a particular tagged value. For example I want to find all elements that don't have the tagged value property Name.

There's no built-in search for it, and the Search Builder does not allow you to create such a filter. But you could write an SQL search for it.

Related

How to figure out correct interfaces for a component in UML component diagrams?

I have a doubt about UML component diagrams interfaces. I have a search component in my system which is responsible for search some product from the database and return the search result to the user. I have drawn search component in 3 different ways as I understood. I want to know which way is the correct one and best in practice and why others are not correct.
In this case I thought search component provides a Search interface to other components like User and they use that Search interface to search. Also the user passes search parameters through that interface and get the result through that interface as well.
In this case I thought Search component provides Search interface and and User uses that interface to pass search params. And it fetch data from the database. Then User component uses Search result interface to get the search result.
In this scenario, I thought Search component need search params to search something. So, It requires Search params. Therefore, I added Search params required interface. After fetching data Search component provides that result. So, I've added provide interface named search result.
These are the ways I thought about this Search Component. I don't have a Idea which one is the correct one. Please explain which one is the correct one and why others are not correct.
Thanks!!!
Lollipops and sockets do not tell what goes in and out but who provides or needs the interface definitions. So, simply spoken, the first variant would be correct. The Search interface offers some search(...) operations which yield some result. And the data must be provided via the Data interface. The component's task would then be to implement a search on data according to these interfaces.
It would help you if you would place the «interfaces» near the socket/lollipop and draw dependency/realization accordingly. For example like this:

Dynamic iFind Index without creating class Index of %iFind.Index.Basic

I am trying to make a general purpose text search feature with %iFind.Index.Basic.
According to the iFind Search Tool documentation, an iFind Index must be created in a Class as below:
Class Aviation.TestSQLSrch Extends %Persistent[...]
{
...
Index NarrBasicIdx On (Narrative) As %iFind.Index.Basic(INDEXOPTION=0,
LANGUAGE="en",LOWER=1);
...
}
But this only applies a field in one single class only.
If the iFind search feature needed to be used generally, then a lot of string fields need to be indexed and that is memory consuming and unpractical.
Is there anyway to do iFind indexing dynamically on demand without the need to alter the Class, and still able to be queried with ##Class(%ResultSet)?
In the documentation, it also mentioned Indexing a JSON Object, but without example given. Is this the place I should explored more on?
Using iFind, you first need to create an index and build it before executing any query (nothing dynamically here, as soon as it is index-based).
If you want something more generic, maybe you should use some other Text Analytics options as NLP (Natural Language Processing)

Assigning Custom Unique IDs to Word 2013 OpenXML Elements

TLDR/Question
How can I best assign unique IDs to (ideally all) of the elements in the XML that describes a Word document such that I can read/write those unique IDs from a Word (2013) Add-In?
Additionally, solutions describing ways I can get a good diff of two Word documents might be helpful but this is not the primary question.
Background
I'm creating an application-level add-in for Word (2013) using VSTO. Part of my task involves diffing an original Word document W with a modified W' so that I can then process the diff for another task. While Word clearly has the capability for diffs/merges (available in the "Review" panel in Word 2013) thus far I have not been able to find a way to programatically extract the diffs.
Therefore, I plan to get the XML for the documents (e.g. using Range.WordOpenXML) and diff them. There are a number of published algorithms for diffing XML documents (i.e. Diff(W.XML, W'.XML)) where the accuracy of the diff is largely dependent on being able to properly match the XML elements from the two documents.
Proposed Solution and Its Problems
Therefore, I'd like to be able to assign a unique ID for every element in the XML of the Word document that I can access from my Add-In. In this case a solution would be something like importing a custom namespace into the package called mynamespace and adding the attribute mynamespace:ID=*** for every element in the DOCX package. The attribute would then be accessible via Range.WordOpenXML.
However, simply using mce:Ignorable, mce:ProcessContent, and mce:PreserveAttributes as detailed at http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2012/09/21/markup-compatibility-and-extensibility.aspx does not work. The modified Word document loads without any issues, however I cannot seem to find any of the attributes, additionally saving the document removes all of the added markup.
From http://openxmldeveloper.org/discussions/formats/f/13/p/8078/163573.aspx it appears that this process of using custom xml via the Markup Compatibility and Extensibility (MCE) portion of the Office Open XML standard has become complicated over the years (patent issues, etc.). Therefore I'm guessing that my issues arise because Word's XML processor just removes all of the markup that it cannot natively process (maybe there is a way to hook into Word's XML processor and give it custom commands?).
For the future viewers:
1) There is absolutely no way to set any kind of id for most of elements, which can survive in Word (you can use any custom tags or attributes, but after MS Word opens the document, it's gone)
2) Only two elements can be used as id - ContentControl, they have ids, and bookmark (it is possible to make a hidden bookmark adding underscore before it's name, it works only from code), their name can be an id.
3) If tracking changes is enabled in Word, it is absolutely possible to see the diffs in XML, using Range.WordOpenXML and getting actual OpenXml from it, as explained here, for example.

Lucene.Net/SpellChecker - multi-word/phrase based auto-suggest

I've implemented Lucenet.NET on my site, using it to index my products which are theatre shows, tours and attractions around London.
I want to implement a "Did you mean?" feature for when users misspell product names that takes the whole product titles into account and not just single words. For example,
If the user typed:
Lodnon Eye
I would like to auto-suggest:
London
London Eye
I assume I nead to have the analyzer index the titles as if they are a single entity, so that SpellChecker can nearest-match on the phrase, as well as the individual words.
How would I do this?
There is a excellent blog series here:
Lucene.NET
Introduction to Lucene
Indexing basics
Search basics
Did you mean..
Faceted Search
Class Reference
I have also found another project called SimpleLucene which you can use to maintain your lucene indexes whenever you need to update or delete a document. Read about it here
i've just recently implemented a phrase autosuggest system in lucene.net.
basically, the java version of lucene has a shinglefilter in one of the contrib folders which breaks down a sentence into all possible phrase combinations. Unfortunately lucene.nets contrib filters aren't quite there yet and so we don't have a shingle filter.
but, a lucene index written in java can be read by lucene.net as long as the versions are the same. so what i did was the following :
created a spell index in lucene.net using the spellcheck.IndexDictionary method as laid out in the "did you mean" section of jake scotts link. please note that only creates a spelling index of single words, not phrases.
i then created a java app that uses the shingle filter to create phrases of the text i'm searching and saves it in a temporary index.
i then wrote another method in dotnet to open this temporary index and add each of the phrases as a line or document into my spelling index that already contains the single words. the trick is to make sure the documents you're adding have the same form as the rest of the spell documents, so i ripped out the methods used in the spellchecker code in the lucene.net project and edited those.
once you've done that you can call the spellcheck.suggestsimilar method and pass it a misspelled phrase and it will return you a valid suggestion.
This is probably not the best solution and I definitely would use the answer suggested by spaceman but here is another possible solution. Use the KeywordAnalyzer or the KeywordTonenizer on each title, this will not break down the title into separate tokens but keep it as one token. Using the SuggestSimilar method would return the whole title as suggestions.

Lucene.NET faceted search

I found a great tutorial on performing a faceted search.
http://www.devatwork.nl/articles/lucenenet/faceted-search-and-drill-down-lucenenet/
This article does not explain how to retrieve the narrowed available attributes to filter from (for further drill down).
Lets say I am looking for planners that are red. When I perform the faceted search, I want to return all available attributes to filter from that are red. Then when I add a "weekly format" filter, I want the attribute list to get even smaller, containing only filters available for the segmented group.
I want love to use Solr/SolrNET but I am in a shared hosting situation with limited access to the actual server.
I am fairly new to lucene.net, so examples are much appreciated.
IIUC, you get a BitArray containing the list of the filtered results. In the tutorial's example, you will have combinedResults as this list. If you want to further narrow this down, you need to reiterate the process: run another searchQuery and intersect the results with the BitArray you have for combinedResults.
I want love to use Solr/SolrNET but I am in a shared hosting situation with limited access to the actual server.
You can always use an off-site, hosted Solr solution. See this question for more information.