-
-
Save dadoonet/3192819 to your computer and use it in GitHub Desktop.
searching on more types but results only for one type, please help!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE 'http://localhost:9200/pms' | |
curl -XPUT 'http://localhost:9200/pms/Building/1' -d ' | |
{ | |
"id":11, | |
"building":{ | |
"address":{ | |
"street2":"test_street2_11", | |
"region":"test_region_11", | |
"id":11, | |
"street1":"test_street1_11", | |
"postalCode":"40349", | |
"country":{ | |
"id":1, | |
"isoName":"test_" | |
}, | |
"city":"test_city_11" | |
} | |
}, | |
"land":{ | |
"id":11, | |
"surface":5.0, | |
"businessEntity":{ | |
"id":132, | |
"pmPortfolios":[ | |
], | |
"name":"test_name_132", | |
"mandator":{ | |
"id":1, | |
"name":"test_name_1", | |
"amInventory":{ | |
"id":54, | |
"description":"test_description_54", | |
"name":"test_name_54", | |
"mgmtCompany":{ | |
"id":9, | |
"created":"2004-03-12T23:00:00.000Z", | |
"name":"test_name_9", | |
"deleted":"1998-03-14T23:00:00.000Z", | |
"modified":"1993-04-21T22:00:00.000Z", | |
"mgmtCompanyType":"GMBH" | |
} | |
}, | |
"amMandatorType":"TYPE1" | |
} | |
} | |
}, | |
"buildingType":"TYPE3", | |
"units":3 | |
} | |
' | |
curl -XPUT 'http://localhost:9200/pms/Unit/1' -d '{ | |
"id":53, | |
"building":{ | |
"id":1128, | |
"address":{ | |
"street2":"test_street2_1128", | |
"region":"test_region_1128", | |
"id":1128, | |
"street1":"test_street1_1128", | |
"postalCode":"51035", | |
"country":{ | |
"id":2, | |
"isoName":"test_" | |
}, | |
"city":"test_city_1128" | |
}, | |
"land":{ | |
"id":1128, | |
"surface":6.0, | |
"businessEntity":{ | |
"id":20, | |
"pmPortfolios":[ | |
], | |
"name":"test_name_20", | |
"mandator":{ | |
"id":29, | |
"name":"test_name_29", | |
"amInventory":{ | |
"id":73, | |
"description":"test_description_73", | |
"name":"test_name_73", | |
"mgmtCompany":{ | |
"id":9, | |
"created":"2004-03-12T23:00:00.000Z", | |
"name":"test_name_9", | |
"deleted":"1998-03-14T23:00:00.000Z", | |
"modified":"1993-04-21T22:00:00.000Z", | |
"mgmtCompanyType":"GMBH" | |
} | |
}, | |
"amMandatorType":"TYPE2" | |
} | |
} | |
}, | |
"buildingType":"OLD", | |
"units":7 | |
}, | |
"numberRooms":7, | |
"unitType":"TYPE3", | |
"unitNumber":"62", | |
"floorNumber":7, | |
"ownershipShare":4 | |
}' | |
# refresh index | |
curl -XPOST 'http://localhost:9200/pms/_refresh' | |
# searching for all | |
curl -XGET 'http://localhost:9200/pms/_search?pretty=true' -d '{ | |
"query" : { | |
"wildcard": { "street1" : "test_street1_11*" } | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment