Skip to content

Instantly share code, notes, and snippets.

Created July 28, 2012 10:03
Show Gist options
  • Save anonymous/3192732 to your computer and use it in GitHub Desktop.
Save anonymous/3192732 to your computer and use it in GitHub Desktop.
searching on more types but results only for one type, please help!
curl -XPUT 'http://localhost:9200/pms/Building/1' -d '{"id":11,"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}'
searching Unit:
curl -XGET 'http://localhost:9200/pms/Unit/_search?pretty=true' -d '{
"query" : {
"wildcard": { "street1" : "test_street1_11*" }
}
}'
searching Building:
curl -XGET 'http://localhost:9200/pms/Building/_search?pretty=true' -d '{
"query" : {
"wildcard": { "street1" : "test_street1_11*" }
}
}'
searching Building and Unit: (result only Building)
curl -XGET 'http://localhost:9200/pms/Building,Unit/_search?pretty=true' -d '{
"query" : {
"wildcard": { "street1" : "test_street1_11*" }
}
}'
searching Building and Unit: (result only Unit)
curl -XGET 'http://localhost:9200/pms/Unit,Building/_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