solrの場所の種類のフィールドに複数の値をインデックスできます。修正schema.xml
とインデックス修正exampledocsの応答は のようなクエリになります:複数値の場所フィールドでsolrを検索
http://192.168.3.19:8983/solr/select?wt=json&indent=true&q=*:*
応答:
{
"id":"TWINX2048-3200PRO",
"name":"CORSAIR XMS 2GB (2 x 1GB) 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) Dual Channel Kit System Memory - Retail",
"manu":"Corsair Microsystems Inc.",
"price":185.0,
"popularity":5,
"inStock":true,
"manufacturedate_dt":"2006-02-13T15:26:37Z",
"payloads":"electronics|6.0 memory|3.0",
"cat":["electronics","memory"],
"store":["37.7752,-122.4232","37.7752,-122.4232","38.7752,-122.4232","39.7752,-122.4232"],
"features":[
"CAS latency 2,\t2-3-3-6 timing, 2.75v, unbuffered, heat-spreader"]},
{
"id":"VS1GB400C3",
"name":"CORSAIR ValueSelect 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) System Memory - Retail",
"manu":"Corsair Microsystems Inc.",
"price":74.99,
"popularity":7,
"inStock":true,
"manufacturedate_dt":"2006-02-13T15:26:37Z",
"payloads":"electronics|4.0 memory|2.0",
"cat":["electronics","memory"],
"store":["37.7752,-100.0232","37.7752,-122.4232","38.7752,-122.4232","39.7752,-122.4232"]},
{
"id":"VDBDB1A16",
"name":"A-DATA V-Series 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) System Memory - OEM",
"manu":"A-DATA Technology Inc.",
"popularity":0,
"inStock":true,
"manufacturedate_dt":"2006-02-13T15:26:37Z",
"payloads":"electronics|0.9 memory|0.1",
"cat":["electronics","memory"],
"store":["45.17614,-93.87341","37.7752,-122.4232","38.7752,-122.4232","39.7752,-122.4232"],
"features":[
"CAS latency 3,\t 2.7v"]},
{
魔女は、データが正しく保存されていることを意味します。 最初に格納されたジオロケーションをクエリするとうまくいきますが、3番目または4番目のジオロケーションを検索すると、solrは結果を返しません。 私は次のクエリを実行した場合:私は結果を得るません
{ "id":"VDBDB1A16", "name":"A-DATA V-Series 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) System Memory - OEM", "manu":"A-DATA Technology Inc.", "popularity":0, "inStock":true, "manufacturedate_dt":"2006-02-13T15:26:37Z", "payloads":"electronics|0.9 memory|0.1", "cat":["electronics","memory"], "store":["45.17614,-93.87341","37.7752,-122.4232","38.7752,-122.4232","39.7752,-122.4232"], "features":[ "CAS latency 3,\t 2.7v"]}, { But if the query is: http://localhost:8983/solr/select?wt=json&indent=true&q=*:*&fq={!geofilt%20pt=38.7752,-122.4232%20sfield=store%20d=50}
:
http://localhost:8983/solr/select?wt=json&indent=true&q=*:*&fq={!geofilt%20pt=45.17614,-93.87341%20sfield=store%20d=5}
を私は正しい答えを得ます。 これは問題になりますか?どんな解決策ですか?
結果が返されない場所で使用しているクエリを表示できますか? –
遅れて申し訳ありませんが、それは週末でした;) – vuky