Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#211 closed defect (fixed)

Search metadata that contains dashes doesn't work properly

Reported by: josegar Owned by: josegar74
Priority: major Milestone: v2.4.3
Component: General Version: v2.4.3
Keywords: Cc:

Description

When searching metadata that contains dashes (and possibly other special characters) no results are retrieved.

Example: A metadata with title "Template example - character", searching for exact title doesn't retrieve the metadata.

In Search.java the first instruction shown:

Element elData  = MainUtil.getDefaultSearch(context, params);
...
Element title = params.getChild(Geonet.SearchResult.TITLE);
if (title != null)
   title.setText(MainUtil.splitWord(title.getText()));
...
searcher.search(context, elData, _config);

should be moved after the processing of title, abstract, any fields. Now is done before and not used the processed fields in the search.

Element title = params.getChild(Geonet.SearchResult.TITLE);
if (title != null)
   title.setText(MainUtil.splitWord(title.getText()));
...
Element elData  = MainUtil.getDefaultSearch(context, params);
...
searcher.search(context, elData, _config);

A similar field processing should be added for CSW searches to behave in similar way

Change History (2)

comment:1 by josegar, 15 years ago

Resolution: fixed
Status: newclosed

comment:2 by mcoudert, 15 years ago

Committed revision 5995.

Note: See TracTickets for help on using tickets.