cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

WC Attribute Search not showing all results when using wildcard?!?

LawrenceS
18-Opal

WC Attribute Search not showing all results when using wildcard?!?

We have an interesting case where we perform 2 different attribute searches looking for CAD objects but the wildcard search shows less results than the non-wildcard search!

For example if we search by our ECN attribute:

ECN Attribute Search Number results Type  of results
0046945 2 asm and dwg
*46945 1 asm only
*46945* 2 asm and dwg
46945* 0 none, as expected

Notes about the above tests:

  • 0046945 is an exact search of the entire attribute field
  • All results were performed by adding/removing text instead of copying and pasting the above.
  • System is set to Simple Search and NOT Advanced (Although I think that is only applicable to the index search)

Things I tried:

  • My first guess was that there was an empty space somewhere in the file name but the above search results exclude that possibility (viz. the exact text 0046945 works. However I did export to notepad++ as csv to look at the raw text and saw no extra characters in that field that differed between the dwg and asm. 
  • The search view is also identical, so it doesn't appear to be filtering out a file type. 
  • I also could not find anything related in the search user preferences.

 

My questions

  1. Does anyone know why searching with a star at the beginning of an attribute requires a star at the end to get all the results, even though there is no difference in the attribute text saved with the cad files?  Also why the asm comes up but not the .drw?
  2. Do you know how to fix this?

 

Thanks, Lawrence


"When you reward an activity, you get more of it!"
1 ACCEPTED SOLUTION

Accepted Solutions
rleir
17-Peridot
(To:LawrenceS)

Hi Lawrence,

1/ with no asterisks, there is an implied trailing asterisk

2/ with a leading asterisk, there is no implied trailing asterisk

3/ both asterisks supplied

4/ the leading 00 is needed, as understood

The rules on implied asterisks are documented by PTC but I don't have a link handy for you.

The results you are seeing suggest that the DWG object's attribute has a trailing space or tab, but that is just a guess.

HTH -- Rick

View solution in original post

31 REPLIES 31
BenLoosli
23-Emerald II
(To:LawrenceS)

What does the detail information page show for that object in Windchill?

Yes, detail pages show the identical attribute value

  • asm
    • lscheeler_0-1585577224554.png

       

  • .drw
    • lscheeler_1-1585577241646.png

 

This is very bizarre. 


"When you reward an activity, you get more of it!"

And here are screenshots of the 2 searches:

  • Complete attribute (no wildcard stars):
    • lscheeler_0-1585578302624.png
  • Partial attribute with wildcard star replacing missing text:
    • lscheeler_1-1585578350608.png

 

Again, between these 2 searches all I did was delete the 2 zeros and replace with a star, then made sure both searches used the same view (latest in this case...although I tried various views to make sure no filter buried inside one of the view's criteria themselves).


"When you reward an activity, you get more of it!"

Maybe try removing the Revision and Iteration from the search? Those fields are very poorly handled by Windchill search and can lead to weird search results:

Thanks for the tip.  It looks like in this case it was tied to WC not showing if there is a trailing space...even when there is one.


"When you reward an activity, you get more of it!"
rleir
17-Peridot
(To:LawrenceS)

Hi Lawrence,

1/ with no asterisks, there is an implied trailing asterisk

2/ with a leading asterisk, there is no implied trailing asterisk

3/ both asterisks supplied

4/ the leading 00 is needed, as understood

The rules on implied asterisks are documented by PTC but I don't have a link handy for you.

The results you are seeing suggest that the DWG object's attribute has a trailing space or tab, but that is just a guess.

HTH -- Rick

@rleir, Well it looks like you are right and provided some very helpful supporting information for understanding what WC is doing!  I will add this to my table in the question body.  Thank you!

 

After your post I decided to open both model and dwg in Creo, and sure enough I found that the dwg had a trailing space!

 

It is very surprising that WC removes the trailing space from the attribute filed so that when I checked in the following ways it shows NO trailing space:

  • Search results:
    • Highlighted the entire field
    • Exported the search results to .csv or .txt
  • Detail page:
    • Highlighted the entire attribute filed text does not show a trailing zero

It is interesting that PTC chose to not display trailing spaces in WC, while still restricting the search.  I always liked the simplicity and consistency of attribute searches, but this seems a step backwards.

 

@rleir , do you or anyone else know of a WC option that can turn on/off or modify this behavior?


"When you reward an activity, you get more of it!"

Well, It looks like I cannot edit my own post/question so will add the table with @rleir very helpful post.

 

ECN Attribute Search Number results Type  of results Explanation
0046945 2 asm and dwg with no asterisks, there is an implied trailing asterisk
*46945 1 asm only with a leading asterisk, there is no implied trailing asterisk
*46945* 2 asm and dwg both asterisks supplied
46945* 0 none, as expected the leading 00 is needed, as understood

"When you reward an activity, you get more of it!"

@LawrenceS Could you please explain why the asm is being shown with *46945 "with a leading asterisk, there is no implied trailing asterisk"? I just don't understand it. The drawing needs to be shown also, or am I wrong?

Hi Bruegg,

See my post from Mar 30, it will help explain that.

 

Hi Lawrence, 

thanks for exposing some 'interesting' Windchill behaviour.

cheers -- Rick

@BjoernRueegg did the post rleir help answer your question?


"When you reward an activity, you get more of it!"

@LawrenceS I wish I could say yes, but I don't understand it. Could you please explain it in other words?


@BjoernRueegg wrote:
"@lscheeler Could you please explain why the asm is being shown with *46945 "with a leading asterisk, there is no implied trailing asterisk"? I just don't understand it. The drawing needs to be shown also, or am I wrong?"
...

@LawrenceS I wish I could say yes, but I don't understand it. Could you please explain it in other words?


I cannot help you understand why PTC did this but what this means is that if you don't use any stars in your attribute search, then

  • Windchill (WC) will assume a start at the end of your search criteria
  • So it is actually NOT searching for an EXACT match and nothing more
  • It is actually search for an exact match with a wildcard at the end
  • So having a wildcard anywhere in search criteria will turn off WC from assuming a wildcard at the end.

 

Since this is pretty confusing considering the following:

  • "*" represent the wildcard that WC uses
  • For this discussion only, let "%" represent the wildcard that WC uses but hides.
  • Then:

 

 

 

Actual ECN Attribute Search Equivalent Implied ECN Attribute Search (using "%") Number of Result What actual ECN attribute values were Explanation
0046945 0046945% 2

asm: "0046945"

dwg: "0046945 "

with no asterisks, there is an implied trailing asterisk
*46945 *46945 1

asm: "0046945"

dwg: "0046945 "

with a leading asterisk, there is no implied trailing asterisk
*46945* *46945* 2

asm: "0046945"

dwg: "0046945 "

both asterisks supplied
46945* 46945* 0

asm: "0046945"

dwg: "0046945 "

the leading 00 is needed, as understood

(😥 tables are terrible on this form as I can't hardly adjust anything!)

 

This is based on the rules that @rleir stated and I verified with my situation, however, I have not tested if this applies to all text or just spaces...or what happens if the space is prior to the text instead of trailing.  Perhaps someone else has tested this...?

 

I hope this is clearer and helps! 😀


"When you reward an activity, you get more of it!"
rleir
17-Peridot
(To:LawrenceS)

Hi all,

If someone can find a reference in the Windchill docs, that would help this discussion.

To sum it up, "there is an implied trailing asterisk when you have not used asterisks at the start".

If you search for 00469 then Windchill searches for 00469* and finds things.

If you search for *469* then Windchill searches for *469* and finds things.  BUT

if you search for 469 then Windchill searches for 469* without the leading zero's, and does not find what you want.

Did I just muddy the waters?

HTH -- Rick

@rleir @BjoernRueegg @STEVEG 

 

We tested another search and we found that the assumed/implied wildcard at the end is only a PARTIAL wildcard!  So for example, if we search

 

So these are the updated attribute search rules from my previous post based on my current testing/knowledge:

  • Windchill (WC) will assume a PARTIAL wildcard at the end of your search criteria, but may ONLY apply to spaces
  • So attribute Searches are actually NOT searching for an EXACT match and nothing more
  • They are actually searching for an exact match with a PARTIAL wildcard at the end
  • So having a wildcard anywhere in search criteria will turn off WC from assuming a partial wildcard at the end.
  • Since this is pretty confusing considering the following:
    • "*" represent the wildcard that WC uses
    • For this discussion only, let "%" represent the wildcard that WC uses but hides.
      • So far this implied trailing wildcard works for trailing spaces but not for all/most characters.
    • Then:
Actual ECN Attribute Search Equivalent Implied ECN Attribute Search (using "%") Number of Result What actual ECN attribute values were Explanation
0046945 0046945% 2

asm: "0046945"

dwg: "0046945 "

with no asterisks, there is an implied trailing asterisk
*46945 *46945 1

asm: "0046945"

dwg: "0046945 "

with a leading asterisk, there is no implied trailing asterisk
*46945* *46945* 2

asm: "0046945"

dwg: "0046945 "

both asterisks supplied
46945* 46945* 0

asm: "0046945"

dwg: "0046945 "

the leading 00 is needed, as understood

004694

(This row is new from my previous post)

% 0

asm: "0046945"

dwg: "0046945 "

Apparently the implied trailing wildcard (which I'm representing as "%") doesn't work for everything but does for trailing spaces.

 


"When you reward an activity, you get more of it!"
STEVEG
21-Topaz I
(To:LawrenceS)

PTC,  WHYYYYYYYYYYYYYYYYYY?

 

This all sounds like:

Searching one way works sometimes, but not for others.  Then it works another way in other searches unless you want to do a search on Mondays and Thursdays.  Yikes!

 

Why can't I just type in a sequence of characters, use an asterisk as a wildcard anywhere in the sequence and as many as I want (just like most other programs in the world), and get a simple search result?

HJ1
15-Moonstone
15-Moonstone
(To:STEVEG)

I was going through the Help Center to understand why Advanced Search gives the results it gives.

 

Imagine trying to get average users excited about using Windchill, those Active Daily Users who occasionally need a drawing or the docs for a specific product. Tell them to use Advanced Search? I was hoping to.

rleir
17-Peridot
(To:HJ1)

We are planning to put TWX Navigate in front of Windchill. The search is simpler though less powerful. This will be better for many users.

 

Another thought: has Windchill search changed with revisions? My experience reported above is with 11.0. Perhaps 11.1 or 11.2 has improved? Today we will learn about 12.0.

cheers -- Rick

Are you doing an Out of the Box ThingWorX Search solution?  if so can you reference documentation or a company app?

 

Or is it custom just for your guys?


"When you reward an activity, you get more of it!"
rleir
17-Peridot
(To:LawrenceS)

@LawrenceS  TWX Navigate comes with some Out-Of-The-Box apps that are at least good enough for a demo. They have a search box built in. Now where was that documentation .. There is a community board for Navigate, you might want to browse there.

 

No doubt we will be modifying the apps after we have the go-ahead from stakeholders.

cheers -- Rick

TomU
23-Emerald IV
(To:LawrenceS)

This is insane.  What a convoluted mess.

STEVEG
21-Topaz I
(To:TomU)

That's because it is.

Unfortunately those links didn't work (I think they are to your company's installation of the help files), but I tried to search for the simple one on PTC's website and perhaps found what you were referring to on spaces and wildcards:

 

 

From this I gathered some especially important points about INDEXED searches:

  • "WC Index Search does NOT index spaces"! (emphasis added! 🙂)
  • "Spaces are only used to split data into distinct keyword strings."

2020-04-30_13-59-07.png

This still doesn't explain non-indexed searches though because:

  • "WC database searches interpret spaces literally"
  • "...non-indexed search...keyword term must account for every character in the value field, including any spaces."

 

According to this documentation I think that non-indexed attribute searches should contain the spaces.


"When you reward an activity, you get more of it!"
TomU
23-Emerald IV
(To:LawrenceS)

Should I create a Windchill product idea requesting a change to this behavior?

  • Would those in this discussion prefer Windchill never automatically add hidden wildcards to the search term?
  • Would you prefer Windchill keep adding them, but also display the wildcards it added on the results page?
  • Should Windchill always add wildcards before and after all search terms?

What is the preferred behavior?

 

For database performance reasons my preference is probably to perform an exact match with no assumed wildcards.  On the other hand, this is opposite what most people are used to and opposite how most web pages work, so there is a pretty good argument for always including wildcards before and after all search terms (unless of course the search term is in quotes.)  Thoughts?

rleir
17-Peridot
(To:TomU)

@TomU @LawrenceS 

Tom:

I think we should start by identifying the documentation for search. It was scattered across several documents, articles and online help resources when I was looking a few months ago. It needs to be described in detail in one place and I should not be relying on my knowledge of Solr (especially since Solr can be customized to work differently in an app).

 

Then we should decide where search is done. There is the Keyword field, and below it in Criteria there is a name search and a number search. At the top right corner there is a quick search. Other places too? I suspect there is a difference in the wildcard handling (please confirm?). These should all work the same from the users' point of view. But my guess is that the Keyword search is done by Solr and the criteria search is done by a database? If they all work the same then sorry, please disregard this.

 

This might be a red herring: did search change from WC 11.0 to 11.1 to 11.2? If so the documentation should reflect this, not just in the patch release notes.

 

With the groundwork done, your question might have some clear answers.

thanks

Rick

HJ1
15-Moonstone
15-Moonstone
(To:rleir)

Then there's the bug factor. Or maybe it's because of the 'attempt to please all' -nature of search tools but our implementation does not hit the "Works according to specification" spot here, I don't know. However, if in search criteria I selected a Classification attribute and use that with Name the latter behaviour alters from what it's without Classifications and the boolean "AND" does not work. Just confusing.  This in 11.0 M030 CPS16.

 

rleir
17-Peridot
(To:HJ1)

@HJ1 So true. This could be largely a documentation problem.

 

Solr is designed to give you the best matches, in ranked order. It's idea of 'best' could be different from your idea of 'best', and the one result that you really want to see might appear on the second page of results.

 

This issue is compounded by the nature of Solr: it is possible (though exceedingly unlikely) for your admin to find the Solr config XML file in the WC server and change the search behavior. If there was a change in behaviour between WC 11.0 and 11.2, then I would be suspecting that PTC had changed this Solr config.

 

lhoogeveen
17-Peridot
(To:TomU)

@TomU Absolutes may be too strong here. Index / keyword searches don't follow the normal rules of using wildcards because of spaces. For non indexed searches, any auto added wildcards should be displayed to users.

 

My preference would be for quick toggles that could also be used used in 'Saved Searches' or have preferences to control the defaults. Something like the image below:

Windchill Search Quick Toggles.jpg

TomU
23-Emerald IV
(To:lhoogeveen)

True, I'm not taking into account the unique behavior of using Solr.  We don't currently have that installed so I'm not up to speed on all the nuances of using it.  Still, wouldn't it be better if Windchill worked the same everywhere, with or without indexing turned on?  When you go to Google to search for something, you don't have to give much thought to how to perform the search or what wildcards to use.  Anything in quotes is an exact phrase and everything else is just terms (assumed wildcards between everything.)  Why can't Windchill also be that easy to use?

Top Tags