Solr查询多个字段,一个字段不需要完全匹配

时间:2017-11-24 06:02:46

标签: solr

  1. 我需要通过Solr查询2个字段。一个是买方国家,另一个是细节。两者都被编入索引。
  2. 例如:这是一些数据

    
    
    {
            "buyerCountry":"Peru",
            "arrivaldate":"2017-08-24 00:00:00",
            "supplier":"MONSANTO HOLLAND BV",
            "details":"Demas Semillas Hortalizas (Incluso ?Silvestres?)",
            "buyer":"MONSANTO PERU S A",
            "id":"IMP_PERU-000029fbb06ee9cb49985cbf3600952b",
            "_version_":1584917551396159488},
          {
            "buyerCountry":"Peru",
            "arrivaldate":"2017-08-28 00:00:00",
            "supplier":"SCHNEIDER ELECTRIC INDUSTRIES SAS",
            "details":"Reles, Para Corriente Nominal Inferior",
            "buyer":"SCHNEIDER ELECTRIC PERU S A",
            "id":"IMP_PERU-00003108b929bf36def5ccf37cc23485",
            "_version_":1584917551525134336},
          {
            "buyerCountry":"Peru",
            "arrivaldate":"2017-08-29 00:00:00",
            "supplier":"FEDERAL-MOGUL CORPORATION",
            "details":"Demas Cajas Cojinetes  Cojinetes",
            "buyer":"REPUESTOS SERVICIOS Y DISTRIBUC S A C",
            "id":"IMP_PERU-000080b39e7e83dbae36c5b465d9cb6c",
            "_version_":1584917551527231488}
    
    
    

  3. 我需要完全匹配field buyerCountry,但是对于字段详细信息,我只需要字段详细信息中的所有搜索字词。我试过q = buyerCountry:"秘鲁" AND details =" Demas Semillas",没有记录。 fq = buyerCountry:" Peru"& fq = details:" Demas Semillas",都没有记录。任何人都可以帮助我吗?

0 个答案:

没有答案