Index tokenized lowercase versions of name and types for UI searches
[simantics/platform.git] / bundles / org.simantics.document.linking.ui / src / org / simantics / document / linking / actions / SearchLinksAction.java
index 5fec36f7c1cb45aa789ba5ec26bc583f8c8f8208..eddeb3e882360e0370c354819bcd4149e6684cd0 100644 (file)
@@ -7,6 +7,7 @@ import org.simantics.db.ReadGraph;
 import org.simantics.db.Resource;
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.db.layer0.adapter.ActionFactory;
+import org.simantics.db.layer0.genericrelation.Dependencies;
 import org.simantics.db.request.Read;
 import org.simantics.document.linking.ontology.DocumentLink;
 import org.simantics.layer0.Layer0;
@@ -41,7 +42,7 @@ public class SearchLinksAction implements ActionFactory {
                                        });
                                        ISearchService searchService = (ISearchService) PlatformUI.getWorkbench().getService(ISearchService.class);
                                        SearchQuery query = new SearchQuery(name);
-                                       query.setSearchFlag("Name", "on"); //$NON-NLS-1$ //$NON-NLS-2$
+                                       query.setSearchFlag(Dependencies.FIELD_NAME_SEARCH, "on"); //$NON-NLS-1$
                                        query.setSearchFlag(DocumentLink.URIs.SearchFunction, "on"); //$NON-NLS-1$
                                        searchService.performQuery(query, ISearchService.ResultBrowser.VIEW, true);
                                } catch (DatabaseException e) {