diff --git a/client/src/components/global-search/global-search-os.component.jsx b/client/src/components/global-search/global-search-os.component.jsx
index 8f1cb596a..4fdbde2c0 100644
--- a/client/src/components/global-search/global-search-os.component.jsx
+++ b/client/src/components/global-search/global-search-os.component.jsx
@@ -15,6 +15,7 @@ export default function GlobalSearchOs() {
const history = useHistory();
const [loading, setLoading] = useState(false);
const [data, setData] = useState(false);
+ const [value, setValue] = useState("");
const executeSearch = async (v) => {
if (v && v && v !== "" && v.length >= 3) {
@@ -41,7 +42,7 @@ export default function GlobalSearchOs() {
options: resultsByType.jobs.map((job) => {
return {
key: job.id,
- value: job.ro_number,
+ value: job.ro_number || "N/A",
label: (
}>
@@ -187,7 +188,6 @@ export default function GlobalSearchOs() {
const debouncedExecuteSearch = _.debounce(executeSearch, 750);
const handleSearch = (value) => {
- console.log("Handle Search");
debouncedExecuteSearch(value);
};
@@ -203,6 +203,7 @@ export default function GlobalSearchOs() {
onSelect={(val, opt) => {
history.push(opt.label.props.to);
}}
+ onClear={() => setData([])}
>
{
return {
key: job.id,
- value: job.ro_number,
+ value: job.ro_number || "N/A",
label: (
}>
@@ -184,7 +184,6 @@ export default function GlobalSearch() {
{
history.push(opt.label.props.to);
diff --git a/server/opensearch/os-handler.js b/server/opensearch/os-handler.js
index c60902077..6bb2adcdc 100644
--- a/server/opensearch/os-handler.js
+++ b/server/opensearch/os-handler.js
@@ -213,9 +213,10 @@ async function OpensearchSearchHandler(req, res) {
{
multi_match: {
query: search,
+ type: "phrase_prefix",
//fields: ["*"],
- fuzziness: "AUTO",
- prefix_length: 2,
+ // fuzziness: "5",
+ //prefix_length: 2,
},
},
{