【问题标题】:qf in solr search query not working as expectedsolr 搜索查询中的 qf 未按预期工作
【发布时间】:2016-10-24 09:44:41
【问题描述】:

在我的 schema.xml 中,所有字段的条目如下:

   <field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
   <field name="name" type="text_general" indexed="true" stored="true"/>
   <field name="description" type="text_general" indexed="true" stored="true"/>
   <field name="manu" type="text_general" indexed="true" stored="true" omitNorms="true"/>
   <field name="producturl" type="string" indexed="false" stored="true" required="true"/>
   <field name="imageurl" type="string" indexed="false" stored="true" />
   <field name="category" type="text_general" indexed="true" stored="true" omitNorms="true"/>
   <field name="categorypath" type="lowercase" indexed="true" stored="true" />
   <field name="weight" type="float" indexed="true" stored="true"/>
   <field name="price"  type="float" indexed="true" stored="true"/>
   <field name="popularity" type="int" indexed="true" stored="true" />
   <field name="inStock" type="boolean" indexed="true" stored="true" />
   <field name="last_modified" type="date" indexed="true" stored="true"/>
   <field name="store" type="text_general" indexed="true" stored="true" omitNorms="true"/>

我正在尝试搜索,如果存在于类别中的搜索字符串必须高于名称中存在搜索字符串的结果。我尝试了以下查询,但总是得到名称中存在查询字符串的结果。

http:///solr//select?debugQuery=on&indent=on&q=查询:"{!edismax mm='100%25' qf='manu^10.0' v=$q1 }" OR 查询:"{!edismax mm='100%25' qf='name^0.2' v=$q1}" OR 查询:"{!edismax mm='100%25' qf='category^10.0' v=$q1}" OR 查询:"{!edismax mm='100%25' qf='categorypath^5.0' v= $q1}"&q1=mobile&wt=csv

上述查询的sn-p结果如下:

mrp_d,manu,description,discount_i,store,_version_,price,categorypath,imageurl,name,id,category,producturl,last_modified
60.68,Not Specified,,50,Lazada,1549123070131699713,30.34,Women|Wallets & Accessories,http://srv-live.lazada.com.my/p/image-78714241-16244bcc8b6488fa7c5dc3479b6b6f69-product.jpg,Fashion Women Lady Cute Cat Clutch Long Purse Wallet Card Holder Mobile Bag Green,LZDNO037FAAA8H917ANMY-18042381,Wallets & Accessories,http://ho.lazada.com.my/SHHSoo?url=http%3A%2F%2Fwww.lazada.com.my%2Ffashion-women-lady-cute-cat-clutch-long-purse-wallet-card-holder-mobile-bag-green-14241787.html%3Foffer_id%3D%7Boffer_id%7D%26affiliate_id%3D%7Baffiliate_id%7D%26offer_name%3D%7Boffer_name%7D_%7Boffer_file_id%7D%26affiliate_name%3D%7Baffiliate_name%7D%26transaction_id%3D%7Btransaction_id%7D&aff_sub=&aff_sub2=&aff_sub3=&aff_sub4=&aff_sub5=,2016-10-25T01:27:53Z
60.3,Not Specified,,50,Lazada,1549123070201954306,30.15,Women|Wallets & Accessories,http://srv-live.lazada.com.my/p/image-53144241-27196219e745476ccd5b10cb0febf37b-product.jpg,Fashion Women Flower Long Zip Wallet Card Holder Mobile Bag Clutch Purse Pockets Navy Blue,LZDNO037FAAA8HAUFANMY-18045720,Wallets & Accessories,http://ho.lazada.com.my/SHHSoo?url=http%3A%2F%2Fwww.lazada.com.my%2Ffashion-women-flower-long-zip-wallet-card-holder-mobile-bag-clutch-purse-pockets-navy-blue-14244135.html%3Foffer_id%3D%7Boffer_id%7D%26affiliate_id%3D%7Baffiliate_id%7D%26offer_name%3D%7Boffer_name%7D_%7Boffer_file_id%7D%26affiliate_name%3D%7Baffiliate_name%7D%26transaction_id%3D%7Btransaction_id%7D&aff_sub=&aff_sub2=&aff_sub3=&aff_sub4=&aff_sub5=,2016-10-25T01:27:53Z
84.66,Not Specified,,66,Lazada,1549123070268014594,28.22,Women|Bags & Clutches|Handbags,http://srv-live.lazada.com.my/p/image-63215241-13718b9bf73f9ba09610037ef9ac8dad-product.jpg,ERA New Women Vintage Leather Coin Cell Phone Mobile Mini Cross-body Shoulder Bag,LZDNO037FAAA8HGBOANMY-18055171,Handbags,http://ho.lazada.com.my/SHHSoo?url=http%3A%2F%2Fwww.lazada.com.my%2Fera-new-women-vintage-leather-coin-cell-phone-mobile-mini-cross-body-shoulder-bag-14251236.html%3Foffer_id%3D%7Boffer_id%7D%26affiliate_id%3D%7Baffiliate_id%7D%26offer_name%3D%7Boffer_name%7D_%7Boffer_file_id%7D%26affiliate_name%3D%7Baffiliate_name%7D%26transaction_id%3D%7Btransaction_id%7D&aff_sub=&aff_sub2=&aff_sub3=&aff_sub4=&aff_sub5=,2016-10-25T01:27:53Z
84.66,Not Specified,,66,Lazada,1549123070268014595,28.22,Women|Bags & Clutches|Handbags,http://srv-live.lazada.com.my/p/image-93215241-08f2151a427d52295328a5d7e5addce1-product.jpg,ERA New Women Vintage Leather Coin Cell Phone Mobile Mini Cross-body Shoulder Bag,LZDNO037FAAA8HGBRANMY-18055174,Handbags,http://ho.lazada.com.my/SHHSoo?url=http%3A%2F%2Fwww.lazada.com.my%2Fera-new-women-vintage-leather-coin-cell-phone-mobile-mini-cross-body-shoulder-bag-14251239.html%3Foffer_id%3D%7Boffer_id%7D%26affiliate_id%3D%7Baffiliate_id%7D%26offer_name%3D%7Boffer_name%7D_%7Boffer_file_id%7D%26affiliate_name%3D%7Baffiliate_name%7D%26transaction_id%3D%7Btransaction_id%7D&aff_sub=&aff_sub2=&aff_sub3=&aff_sub4=&aff_sub5=,2016-10-25T01:27:53Z

我在这里做错了什么?如何微调结果?

提前感谢您的帮助。

编辑(带有调试结果的xml结果):

查询: http:///solr//select?debugQuery=on&defType=edismax&indent=on&mm=3&ps=10&q=mobile&qf=category^10.0%20manu^10.0%20categorypath^5.0%20name^0.2&wt=xml

完整回复:

<?xml version="1.0" encoding="UTF-8"?>
<response>

<lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">26</int>
  <lst name="params">
    <str name="mm">3</str>
    <str name="q">mobile</str>
    <str name="defType">edismax</str>
    <str name="ps">10</str>
    <str name="indent">on</str>
    <str name="qf">category^10.0 manu^10.0 categorypath^5.0 name^0.2</str>
    <str name="wt">xml</str>
    <str name="debugQuery">on</str>
    <str name="_">1477372296342</str>
  </lst>
</lst>
<result name="response" numFound="12450223" start="0">
  <doc>
    <str name="description">This vertical case is made from PU leather material, and specially designed for your smartphone. The case features card slot and earphone hole for convenient use. It can be used as a shoulder bag or holster case. ? Made from PU material ? Come with two card slot ? Used as a shoulder bag and holster case ? Provides all-around protection</str>
    <int name="discount_i">40</int>
    <double name="mrp_d">990.0</double>
    <str name="store">Flipkart</str>
    <float name="price">490.0</float>
    <str name="categorypath">Mobiles &amp; Tablets|Mobile Accessories|Cases &amp; Covers</str>
    <str name="imageurl">http://img5a.flixcart.com/image/cases-covers/holster/h/c/x/jojo-jojo288086-400x400-imae822ffdyrhgmg.jpeg</str>
    <str name="name">Jojo Holster for Fly Mobile MV 247</str>
    <str name="id">ACCE9GQ3BMCHZXYY</str>
    <str name="category">Cases &amp; Covers</str>
    <str name="manu">Jojo</str>
    <str name="producturl">http://dl.flipkart.com/dl/jojo-holster-fly-mobile-mv-247/p/itme9gq44hz9dtjh?pid=ACCE9GQ3BMCHZXYY</str>
    <date name="last_modified">2016-10-21T07:40:13Z</date>
    <long name="_version_">1548784125563895810</long></doc>
  <doc>
    <str name="description">Mobile Cover Shop having numerous designs of exclusive range for mobile covers, back cover and protective cover and cases. Each cover is made from a special strong and durable plastic material, which provides your gadget with long lasting protection. We suggest you to keep this case in your collection for being in sync with latest trend in fashion.</str>
    <int name="discount_i">50</int>
    <double name="mrp_d">1200.0</double>
    <str name="store">Flipkart</str>
    <float name="price">599.0</float>
    <str name="categorypath">Mobiles &amp; Tablets|Mobile Accessories|Cases &amp; Covers</str>
    <str name="imageurl">http://img6a.flixcart.com/image/cases-covers/back-cover/p/k/e/mobile-cover-shop-mcs24354-400x400-imae8x3ydhwu6jrd.jpeg</str>
    <str name="name">Mobile Cover Shop Back Cover for Lenovo K920</str>
    <str name="id">ACCE8Y3U5HFZVPKE</str>
    <str name="category">Cases &amp; Covers</str>
    <str name="manu">Mobile Cover Shop</str>
    <str name="producturl">http://dl.flipkart.com/dl/mobile-cover-shop-back-lenovo-k920/p/itme8y3utmh9jzaa?pid=ACCE8Y3U5HFZVPKE</str>
    <date name="last_modified">2016-10-21T07:40:13Z</date>
    <long name="_version_">1548784125873225732</long></doc>
  <doc>
    <str name="description">Mobile Cover Shop having numerous designs of exclusive range for mobile covers, back cover and protective cover and cases. Each cover is made from a special strong and durable plastic material, which provides your gadget with long lasting protection. We suggest you to keep this case in your collection for being in sync with latest trend in fashion.</str>
    <int name="discount_i">50</int>
    <double name="mrp_d">1200.0</double>
    <str name="store">Flipkart</str>
    <float name="price">599.0</float>
    <str name="categorypath">Mobiles &amp; Tablets|Mobile Accessories|Cases &amp; Covers</str>
    <str name="imageurl">http://img6a.flixcart.com/image/cases-covers/back-cover/d/s/u/mobile-cover-shop-mcs23176-400x400-imae8p53hgwggnwb.jpeg</str>
    <str name="name">Mobile Cover Shop Back Cover for Samsung Galaxy S5</str>
    <str name="id">ACCE8Y3TJPXAFDSU</str>
    <str name="category">Cases &amp; Covers</str>
    <str name="manu">Mobile Cover Shop</str>
    <str name="producturl">http://dl.flipkart.com/dl/mobile-cover-shop-back-samsung-galaxy-s5/p/itme8y3tdjn4nqtj?pid=ACCE8Y3TJPXAFDSU</str>
    <date name="last_modified">2016-10-21T07:40:14Z</date>
    <long name="_version_">1548784126891393025</long></doc>
  <doc>
    <str name="description">Mobile Cover Shop having numerous designs of exclusive range for mobile covers, back cover and protective cover and cases. Each cover is made from a special strong and durable plastic material, which provides your gadget with long lasting protection. We suggest you to keep this case in your collection for being in sync with latest trend in fashion.</str>
    <int name="discount_i">50</int>
    <double name="mrp_d">1200.0</double>
    <str name="store">Flipkart</str>
    <float name="price">599.0</float>
    <str name="categorypath">Mobiles &amp; Tablets|Mobile Accessories|Cases &amp; Covers</str>
    <str name="imageurl">http://img5a.flixcart.com/image/cases-covers/back-cover/z/g/e/mobile-cover-shop-mcs23352-400x400-imae8p544uhatwtc.jpeg</str>
    <str name="name">Mobile Cover Shop Back Cover for Samsung Galaxy Note 2 N7100</str>
    <str name="id">ACCE8Y3TGHAK2ZGE</str>
    <str name="category">Cases &amp; Covers</str>
    <str name="manu">Mobile Cover Shop</str>
    <str name="producturl">http://dl.flipkart.com/dl/mobile-cover-shop-back-samsung-galaxy-note-2-n7100/p/itme8y3tcugyxmeb?pid=ACCE8Y3TGHAK2ZGE</str>
    <date name="last_modified">2016-10-21T07:40:15Z</date>
    <long name="_version_">1548784128432799747</long></doc>
  <doc>
    <str name="description">Mobile Cover Shop having numerous designs of exclusive range for mobile covers, back cover and protective cover and cases. Each cover is made from a special strong and durable plastic material, which provides your gadget with long lasting protection. We suggest you to keep this case in your collection for being in sync with latest trend in fashion.</str>
    <int name="discount_i">50</int>
    <double name="mrp_d">1200.0</double>
    <str name="store">Flipkart</str>
    <float name="price">599.0</float>
    <str name="categorypath">Mobiles &amp; Tablets|Mobile Accessories|Cases &amp; Covers</str>
    <str name="imageurl">http://img6a.flixcart.com/image/cases-covers/back-cover/x/3/q/mobile-cover-shop-mcs22843-400x400-imae8p53feah3b2q.jpeg</str>
    <str name="name">Mobile Cover Shop Back Cover for Apple iPhone 6 Plus</str>
    <str name="id">ACCE8Y3TM8YWHX3Q</str>
    <str name="category">Cases &amp; Covers</str>
    <str name="manu">Mobile Cover Shop</str>
    <str name="producturl">http://dl.flipkart.com/dl/mobile-cover-shop-back-apple-iphone-6-plus/p/itme8y3twsyngygp?pid=ACCE8Y3TM8YWHX3Q</str>
    <date name="last_modified">2016-10-21T07:40:15Z</date>
    <long name="_version_">1548784128862715904</long></doc>
</result>
<lst name="debug">
  <str name="rawquerystring">mobile</str>
  <str name="querystring">mobile</str>
  <str name="parsedquery">(+DisjunctionMaxQuery(((manu:mobile)^10.0 | (name:mobile)^0.2 | (category:mobile)^10.0 | (categorypath:mobile)^5.0)))/no_coord</str>
  <str name="parsedquery_toString">+((manu:mobile)^10.0 | (name:mobile)^0.2 | (category:mobile)^10.0 | (categorypath:mobile)^5.0)</str>
  <lst name="explain">
    <str name="ACCE9GQ3BMCHZXYY">
0.9692176 = max of:
  0.9692176 = weight(name:mobile in 311) [], result of:
    0.9692176 = score(doc=311,freq=1.0 = termFreq=1.0
), product of:
      0.2 = boost
      4.5229306 = idf(docFreq=177649, docCount=16362429)
      1.0714487 = tfNorm, computed from:
        1.0 = termFreq=1.0
        1.2 = parameter k1
        0.75 = parameter b
        8.496009 = avgFieldLength
        7.111111 = fieldLength
</str>
    <str name="ACCE8Y3U5HFZVPKE">
62.168762 = max of:
  62.168762 = weight(manu:mobile in 372) [], result of:
    62.168762 = score(doc=372,freq=1.0 = termFreq=1.0
), product of:
      10.0 = boost
      6.216876 = idf(docFreq=32829, docCount=16452022)
      1.0 = tfNorm, computed from:
        1.0 = termFreq=1.0
        1.2 = parameter k1
        0.0 = parameter b (norms omitted for field)
  0.8345084 = weight(name:mobile in 372) [], result of:
    0.8345084 = score(doc=372,freq=1.0 = termFreq=1.0
), product of:
      0.2 = boost
      4.5229306 = idf(docFreq=177649, docCount=16362429)
      0.92253065 = tfNorm, computed from:
        1.0 = termFreq=1.0
        1.2 = parameter k1
        0.75 = parameter b
        8.496009 = avgFieldLength
        10.24 = fieldLength
</str>
    <str name="ACCE8Y3TJPXAFDSU">
62.168762 = max of:
  62.168762 = weight(manu:mobile in 570) [], result of:
    62.168762 = score(doc=570,freq=1.0 = termFreq=1.0
), product of:
      10.0 = boost
      6.216876 = idf(docFreq=32829, docCount=16452022)
      1.0 = tfNorm, computed from:
        1.0 = termFreq=1.0
        1.2 = parameter k1
        0.0 = parameter b (norms omitted for field)
  0.8345084 = weight(name:mobile in 570) [], result of:
    0.8345084 = score(doc=570,freq=1.0 = termFreq=1.0
), product of:
      0.2 = boost
      4.5229306 = idf(docFreq=177649, docCount=16362429)
      0.92253065 = tfNorm, computed from:
        1.0 = termFreq=1.0
        1.2 = parameter k1
        0.75 = parameter b
        8.496009 = avgFieldLength
        10.24 = fieldLength
</str>
    <str name="ACCE8Y3TGHAK2ZGE">
62.168762 = max of:
  62.168762 = weight(manu:mobile in 819) [], result of:
    62.168762 = score(doc=819,freq=1.0 = termFreq=1.0
), product of:
      10.0 = boost
      6.216876 = idf(docFreq=32829, docCount=16452022)
      1.0 = tfNorm, computed from:
        1.0 = termFreq=1.0
        1.2 = parameter k1
        0.0 = parameter b (norms omitted for field)
  0.6644898 = weight(name:mobile in 819) [], result of:
    0.6644898 = score(doc=819,freq=1.0 = termFreq=1.0
), product of:
      0.2 = boost
      4.5229306 = idf(docFreq=177649, docCount=16362429)
      0.7345788 = tfNorm, computed from:
        1.0 = termFreq=1.0
        1.2 = parameter k1
        0.75 = parameter b
        8.496009 = avgFieldLength
        16.0 = fieldLength
</str>
    <str name="ACCE8Y3TM8YWHX3Q">
62.168762 = max of:
  62.168762 = weight(manu:mobile in 886) [], result of:
    62.168762 = score(doc=886,freq=1.0 = termFreq=1.0
), product of:
      10.0 = boost
      6.216876 = idf(docFreq=32829, docCount=16452022)
      1.0 = tfNorm, computed from:
        1.0 = termFreq=1.0
        1.2 = parameter k1
        0.0 = parameter b (norms omitted for field)
  0.8345084 = weight(name:mobile in 886) [], result of:
    0.8345084 = score(doc=886,freq=1.0 = termFreq=1.0
), product of:
      0.2 = boost
      4.5229306 = idf(docFreq=177649, docCount=16362429)
      0.92253065 = tfNorm, computed from:
        1.0 = termFreq=1.0
        1.2 = parameter k1
        0.75 = parameter b
        8.496009 = avgFieldLength
        10.24 = fieldLength
</str>
  </lst>
  <str name="QParser">ExtendedDismaxQParser</str>
  <null name="altquerystring"/>
  <null name="boost_queries"/>
  <arr name="parsed_boost_queries"/>
  <null name="boostfuncs"/>
  <lst name="timing">
    <double name="time">26.0</double>
    <lst name="prepare">
      <double name="time">0.0</double>
      <lst name="query">
        <double name="time">0.0</double>
      </lst>
      <lst name="facet">
        <double name="time">0.0</double>
      </lst>
      <lst name="facet_module">
        <double name="time">0.0</double>
      </lst>
      <lst name="mlt">
        <double name="time">0.0</double>
      </lst>
      <lst name="highlight">
        <double name="time">0.0</double>
      </lst>
      <lst name="stats">
        <double name="time">0.0</double>
      </lst>
      <lst name="expand">
        <double name="time">0.0</double>
      </lst>
      <lst name="debug">
        <double name="time">0.0</double>
      </lst>
    </lst>
    <lst name="process">
      <double name="time">25.0</double>
      <lst name="query">
        <double name="time">0.0</double>
      </lst>
      <lst name="facet">
        <double name="time">0.0</double>
      </lst>
      <lst name="facet_module">
        <double name="time">0.0</double>
      </lst>
      <lst name="mlt">
        <double name="time">0.0</double>
      </lst>
      <lst name="highlight">
        <double name="time">0.0</double>
      </lst>
      <lst name="stats">
        <double name="time">0.0</double>
      </lst>
      <lst name="expand">
        <double name="time">0.0</double>
      </lst>
      <lst name="debug">
        <double name="time">24.0</double>
      </lst>
    </lst>
  </lst>
</lst>
</response>

【问题讨论】:

  • 能否请您也为我发布结果集。我怀疑该查询也存在于您要提升十倍的类别中......但我需要查看结果来确认它。
  • 感谢左撇子的评论。我编辑了问题并添加了结果。
  • 为了让事情变得非常清楚,请您做两处更改:首先,在搜索 URL 中,您能否保留实际的关键字,以便我知道产生结果的内容。其次,您能否以 XML 格式发布结果,因为这里更容易阅读。谢谢。
  • 我现在只搜索一个词 - “mobile”。我再次添加了带有完整响应的查询以及 xml 中的调试结果。我试图了解重量是如何计算的,但无法通过调试结果获得。

标签: search solr lucene


【解决方案1】:

如上所述,在优化搜索的查询部分之前,schema.xml 中需要进行多项更改。此链接包含有关我正在搜索的内容的详细信息:

http://apprize.info/php/solr_4/6.html

编辑2: 因为我试图只搜索手机,而手机的类别被定义为 solr 数据中的手机。因此,我将 schema.xml 中的制造商和类别字段更改如下:

  <!--<field name="manu" type="text_general" indexed="true" stored="true" omitNorms="false"/>-->
   <field name="manu" type="text_synonyms_brand" indexed="true" stored="true" omitNorms="false"/>
   <!--<field name="category" type="text_general" indexed="true" stored="true" omitNorms="false"/>-->
   <field name="category" type="text_synonyms_category" indexed="true" stored="true" omitNorms="false"/>

并配置了各自的字段类型如下:

<fieldType name="text_synonyms_brand" class="solr.TextField" positionIncrementGap="100">
<!--<analyzer type="index">
 <tokenizer class="solr.KeywordTokenizerFactory"/>
 <filter class="solr.LowerCaseFilterFactory" />
</analyzer>-->
<analyzer type="query">
 <tokenizer class="solr.KeywordTokenizerFactory"/>
 <filter class="solr.LowerCaseFilterFactory"/>
 <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" splitOnNumerics="0" catenateWords="0" catenateNumbers="0" catenateAll="1" stemEnglishPossessive="0" splitOnCaseChange="0"/>
 <filter class="solr.SynonymFilterFactory" synonyms="synonyms_brand.txt" ignoreCase="true" expand="true"/> <!-- tokenizerFactory="solr.KeywordTokenizerFactory"/> -->
 <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
</analyzer>
</fieldType>

<fieldType name="text_synonyms_category" class="solr.TextField" positionIncrementGap="100">
<!--<analyzer type="index">
 <tokenizer class="solr.KeywordTokenizerFactory"/>
 <filter class="solr.LowerCaseFilterFactory" />
</analyzer>-->
<analyzer type="query">
 <tokenizer class="solr.KeywordTokenizerFactory"/>
 <filter class="solr.LowerCaseFilterFactory"/>
 <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" splitOnNumerics="0" catenateWords="0" catenateNumbers="0" catenateAll="1" stemEnglishPossessive="0" splitOnCaseChange="0"/>
 <filter class="solr.SynonymFilterFactory" synonyms="synonyms_category.txt" ignoreCase="true" expand="true"/> <!-- tokenizerFactory="solr.KeywordTokenizerFactory"/>-->
 <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
</analyzer>
</fieldType>

然后在 synonyms*.txt 中我提出了几个同义词如下:

# cat synonyms_category.txt
Iphone=>mobilephones
mobile=>mobilephones
phone=>mobilephones
galaxy=>mobilephones

# cat synonyms_brand.txt
Iphone=>apple
galaxy=>samsung

重新启动 solr(作为索引时间分析器我注释掉)后,我得到了正确的结果。

几个例子是:

  1. 对于移动设备:

查询:

http://<solr-url>/solr/<core>/select?debugQuery=on&indent=on&q=(_query_:"{!edismax mm='100%25' qf='manu^2.0' v=$q1}") OR (_query_:"{!edismax mm='100%25' qf='category^2.0' v=$q1}")&q1=mobile&wt=csv

结果:

mrp_d,manu,description,discount_i,store,_version_,price,categorypath,imageurl,name,id,category,producturl,last_modified
782.0,OEM,,55,Lazada,1549960720168255490,350.0,Mobiles & Tablets|Mobile Phones,http://srv-live.lazada.com.my/p/image-8341802-1-product.jpg,Doogee Voyager2 DG310 5inch Smartphone Android 4.4 Quad Core MT6582 1.3GHZ 3G 1-8GB,LZDOE702ELBSM1QANMY-2279016,Mobile Phones,http://ho.lazada.com.my/SHHSoo?url=http%3A%2F%2Fwww.lazada.com.my%2Fdoogee-voyager2-dg310-5inch-smartphone-android-44-quad-core-mt6582-13ghz-3g-1-8gb-2081438.html%3Foffer_id%3D%7Boffer_id%7D%26affiliate_id%3D%7Baffiliate_id%7D%26offer_name%3D%7Boffer_name%7D_%7Boffer_file_id%7D%26affiliate_name%3D%7Baffiliate_name%7D%26transaction_id%3D%7Btransaction_id%7D&aff_sub=&aff_sub2=&aff_sub3=&aff_sub4=&aff_sub5=,2016-11-03T07:21:57Z
39.0,OEM,,50,Lazada,1549960721000824834,19.4,Mobiles & Tablets|Mobile Phones,http://srv-live.lazada.com.my/p/image-6515112-1-product.jpg,Retro Phone Handset for iPhone 4/4S,LZDOE702ELBTC2CANMY-2320607,Mobile Phones,http://ho.lazada.com.my/SHHSoo?url=http%3A%2F%2Fwww.lazada.com.my%2Fretro-phone-handset-for-iphone-44s-2115156.html%3Foffer_id%3D%7Boffer_id%7D%26affiliate_id%3D%7Baffiliate_id%7D%26offer_name%3D%7Boffer_name%7D_%7Boffer_file_id%7D%26affiliate_name%3D%7Baffiliate_name%7D%26transaction_id%3D%7Btransaction_id%7D&aff_sub=&aff_sub2=&aff_sub3=&aff_sub4=&aff_sub5=,2016-11-03T07:21:58Z
  1. iphone:

查询:

http://<solr-url>/solr/<core>/select?debugQuery=on&indent=on&q=(_query_:"{!edismax mm='100%25' qf='manu^2.0' v=$q1}") AND (_query_:"{!edismax mm='100%25' qf='category^2.0' v=$q1}")&q1=iphone&wt=csv

结果:

mrp_d,manu,description,discount_i,store,_version_,price,categorypath,imageurl,name,id,category,producturl,last_modified
3199.0,Apple,,28,Lazada,1549961206837542912,2299.0,Mobiles & Tablets|Mobile Phones,http://srv-live.lazada.com.my/p/image-9072684-1-product.jpg,Apple iPhone 6s 16GB (Gold) Malaysia Set,LZDAP564ELAA2W839ANMY-5749957,Mobile Phones,http://ho.lazada.com.my/SHHSoo?url=http%3A%2F%2Fwww.lazada.com.my%2Fapple-iphone-6s-16gb-gold-malaysia-set-4862709.html%3Foffer_id%3D%7Boffer_id%7D%26affiliate_id%3D%7Baffiliate_id%7D%26offer_name%3D%7Boffer_name%7D_%7Boffer_file_id%7D%26affiliate_name%3D%7Baffiliate_name%7D%26transaction_id%3D%7Btransaction_id%7D&aff_sub=&aff_sub2=&aff_sub3=&aff_sub4=&aff_sub5=,2016-11-03T07:29:42Z
1499.0,Apple,,52,Lazada,1549961206837542915,705.0,Mobiles & Tablets|Mobile Phones,http://srv-live.lazada.com.my/p/image-0684205-490901cdc6628dd90beefa8e05173cdd-product.jpg,100% New Condition (Refurbished) Apple iPhone 5 16GB (White)[Grade A],LZDAP564ELAA2ZP7GANMY-5976742,Mobile Phones,http://ho.lazada.com.my/SHHSoo?url=http%3A%2F%2Fwww.lazada.com.my%2F100-new-condition-refurbished-apple-iphone-5-16gb-whitegrade-a-5024860.html%3Foffer_id%3D%7Boffer_id%7D%26affiliate_id%3D%7Baffiliate_id%7D%26offer_name%3D%7Boffer_name%7D_%7Boffer_file_id%7D%26affiliate_name%3D%7Baffiliate_name%7D%26transaction_id%3D%7Btransaction_id%7D&aff_sub=&aff_sub2=&aff_sub3=&aff_sub4=&aff_sub5=,2016-11-03T07:29:42Z

【讨论】:

    猜你喜欢
    • 2021-01-12
    • 1970-01-01
    • 2012-11-13
    • 2017-05-12
    • 2018-10-17
    • 1970-01-01
    • 2015-09-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多