Skip to content

Commit 903d85a

Browse files
api updated to server
1 parent 6236b2d commit 903d85a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/AutoSuggest.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ import ListResults from './ListResults'
55
import axios from 'axios'
66

77
// Imagine you have a list of languages that you'd like to autosuggest.
8-
const languages = [
9-
{
10-
name: 'C',
11-
year: 1972
12-
},
13-
{
14-
name: 'Elm',
15-
year: 2012
16-
},
17-
]
8+
// const languages = [
9+
// {
10+
// name: 'C',
11+
// year: 1972
12+
// },
13+
// {
14+
// name: 'Elm',
15+
// year: 2012
16+
// },
17+
// ]
1818

1919
// Teach Autosuggest how to calculate suggestions for any given input value.
2020
// const getSuggestions = value => {
@@ -119,7 +119,7 @@ class AutoSuggest extends React.Component {
119119
var suggestion = null
120120
value.length > 2 ? suggestion = getSuggestionOnSearch(value) : null
121121
suggestion !== null
122-
? axios.post("http://localhost:9200/nodes/node_details/_search", suggestionJson)
122+
? axios.post("http://139.59.40.161:9200/nodes/node_details/_search", suggestionJson)
123123
.then((response)=>{
124124
// console.log(response.data.suggest)
125125
var data = renderData(response.data.suggest)
@@ -158,7 +158,7 @@ class AutoSuggest extends React.Component {
158158
}
159159
searchQuery.query.multi_match.query = this.state.value
160160
// console.log(searchQuery)
161-
axios.post('http://localhost:9200/nodes/node_details/_search', searchQuery )
161+
axios.post('http://139.59.40.161:9200/nodes/node_details/_search', searchQuery )
162162
.then((response)=>{
163163
console.log(response.data.hits.hits)
164164
const searchResult = response.data.hits.hits

0 commit comments

Comments
 (0)