Author Topic: Search with wildcards  (Read 621 times)

skiwi

  • EA Practitioner
  • ***
  • Posts: 1902
  • Karma: +41/-80
    • View Profile
Search with wildcards
« on: September 27, 2019, 11:24:34 am »

In https://www.sparxsystems.com/resources/show-video.html?video=gettingstarted-modelsearchbasics
and example is provided of using a common search for element name "Customer"


This example implies to me that it will find all elements that include the literal "customer" in them.


This is not my experience (with EA 14 and SLQ Server back end).
The search instead appears to find all element names starting with customer.


Let me give you and example
I have a component name "MS Access".
When I search for "access" (or "Access" or "ACCESS") it does not return this element in the search results. Noted that the search is case in-sensitive.
When I search for "MS" it does not return this element in the search results (it returns "CountryAlpha2CodeSimpleType" go figure)
Yet when I search for "MS Access" it does find the element.


What is going on?


How do I use a wildcard or similar to achieve the result I want, returning all elements this have "access" in their element name, e.g. "MS Access", "Microsoft access"





Orthogonality rules
Using EA15.1 (1526) on Windows 10 Enterprise/64 bit. Repositories in SQLServer2014 R2 & Access2003/JET4.0

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 7376
  • Karma: +175/-120
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Search with wildcards
« Reply #1 on: September 27, 2019, 12:23:39 pm »
Hi Skiwi,

I can confirm the behaviour,  If you make a copy of the Element Name Search, you'll see it is using the Equal To condition whereas the Simple search uses the Contains conditon.

I guess it should be a Contains search for consistency.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

skiwi

  • EA Practitioner
  • ***
  • Posts: 1902
  • Karma: +41/-80
    • View Profile
Re: Search with wildcards
« Reply #2 on: September 27, 2019, 12:59:51 pm »

Thank you, I see.
Now I look at the help again https://sparxsystems.com/enterprise_architect_user_guide/14.0/model_navigation/pre-defined_search_definitions.html
it does say
Quote
Element Name          Searches for an exact match against the element name, alias, method or operation; the default search in the 'Search in Model' menu option in the Code Editor.


I think the problem here is, as you say, Konsistency, cf the Find Package [name] search
Quote
Find Package          Searches for a named Package in the model.

which does not search for an exact match.
In fact only one search is for an exact match!
Orthogonality rules
Using EA15.1 (1526) on Windows 10 Enterprise/64 bit. Repositories in SQLServer2014 R2 & Access2003/JET4.0

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 7276
  • Karma: +84/-12
    • View Profile
Re: Search with wildcards
« Reply #3 on: September 30, 2019, 09:43:23 am »
I guess it should be a Contains search for consistency.
Why would we want the same search twice? It's equal to explicitly so that it close to instant. Contains requires searching the entire database which can take a while.
Eve

support@sparxsystems.com

skiwi

  • EA Practitioner
  • ***
  • Posts: 1902
  • Karma: +41/-80
    • View Profile
Re: Search with wildcards
« Reply #4 on: September 30, 2019, 11:18:07 am »
Because every other search is a "contains" - this leads to user confusion (at least for this user).

I'm not clear what you mean by "same search twice" - I don't see an existing search that is 'Element name contains ...'
Orthogonality rules
Using EA15.1 (1526) on Windows 10 Enterprise/64 bit. Repositories in SQLServer2014 R2 & Access2003/JET4.0