Advertisement
Guest User

Untitled

a guest
Apr 19th, 2022
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.37 KB | None | 0 0
  1. Url: "/?product_cat=fashion-3&s=fashion&post_type=product&wpsolr_fq%5B0%5D=product_cat_str%3AMen&wpsolr_fq%5B1%5D=product_cat_str%3AEyewear&wpsolr_fq%5B2%5D=product_cat_str%3AEyeglasses&wpsolr_sort=sort_by_relevancy_desc"
  2. Index: "new_index"
  3. Nb results shown: 20
  4. Total nb results: 213
  5. Speed: 127 ms
  6. Query: {
  7. "from": 0,
  8. "size": 20,
  9. "highlight": {
  10. "require_field_match": false,
  11. "pre_tags": [
  12. "<b>"
  13. ],
  14. "post_tags": [
  15. "<\/b>"
  16. ],
  17. "fields": {
  18. "title": {
  19. "fragment_size": 100,
  20. "number_of_fragments": 1
  21. }
  22. }
  23. },
  24. "_source": [
  25. "id",
  26. "PID",
  27. "type",
  28. "meta_type_s",
  29. "title",
  30. "numcomments",
  31. "comments",
  32. "displaydate",
  33. "displaymodified",
  34. "*categories_str",
  35. "author",
  36. "*post_thumbnail_href_str",
  37. "*post_href_str",
  38. "snippet_s"
  39. ],
  40. "query": {
  41. "function_score": {
  42. "functions": [
  43. {
  44. "filter": {
  45. "match": {
  46. "product_cat_str": "Smartphones"
  47. }
  48. },
  49. "weight": 3
  50. },
  51. {
  52. "filter": {
  53. "match": {
  54. "product_cat_str": "Smartwatch Accessories"
  55. }
  56. },
  57. "weight": 2.5
  58. },
  59. {
  60. "filter": {
  61. "match": {
  62. "product_cat_str": "Apples"
  63. }
  64. },
  65. "weight": 3
  66. },
  67. {
  68. "filter": {
  69. "match": {
  70. "product_cat_str": "Juice"
  71. }
  72. },
  73. "weight": 3
  74. },
  75. {
  76. "filter": {
  77. "match": {
  78. "product_cat_str": "Pie"
  79. }
  80. },
  81. "weight": 2
  82. },
  83. {
  84. "filter": {
  85. "match": {
  86. "product_cat_str": "Mangos"
  87. }
  88. },
  89. "weight": 7
  90. },
  91. {
  92. "filter": {
  93. "match": {
  94. "product_brand_str": "Hugo Boss"
  95. }
  96. },
  97. "weight": 2
  98. },
  99. {
  100. "filter": {
  101. "match": {
  102. "product_brand_str": "Aamrai"
  103. }
  104. },
  105. "weight": 4
  106. },
  107. {
  108. "filter": {
  109. "match": {
  110. "product_brand_str": "Del Monte"
  111. }
  112. },
  113. "weight": 3
  114. }
  115. ],
  116. "query": {
  117. "bool": {
  118. "must": {
  119. "query_string": {
  120. "fields": [
  121. "title^5",
  122. "content^2",
  123. "product_cat_str",
  124. "product_brand_str"
  125. ],
  126. "query": "(fashion)",
  127. "default_operator": "AND"
  128. }
  129. },
  130. "filter": {
  131. "bool": {
  132. "must": [
  133. {
  134. "bool": {
  135. "must_not": [
  136. {
  137. "terms": {
  138. "post_status_s": [
  139. "draft",
  140. "pending",
  141. "trash",
  142. "future",
  143. "private",
  144. "auto-draft"
  145. ]
  146. }
  147. }
  148. ]
  149. }
  150. },
  151. {
  152. "bool": {
  153. "must": {
  154. "bool": {
  155. "must": [
  156. {
  157. "terms": {
  158. "non_flat_hierarchy_product_cat_str": [
  159. "Men"
  160. ]
  161. }
  162. },
  163. {
  164. "terms": {
  165. "non_flat_hierarchy_product_cat_str": [
  166. "Eyewear"
  167. ]
  168. }
  169. },
  170. {
  171. "terms": {
  172. "non_flat_hierarchy_product_cat_str": [
  173. "Eyeglasses"
  174. ]
  175. }
  176. }
  177. ]
  178. }
  179. }
  180. }
  181. },
  182. {
  183. "bool": {
  184. "must_not": [
  185. {
  186. "terms": {
  187. "type": [
  188. "shop_order"
  189. ]
  190. }
  191. }
  192. ]
  193. }
  194. },
  195. {
  196. "bool": {
  197. "should": [
  198. {
  199. "bool": {
  200. "must_not": [
  201. {
  202. "terms": {
  203. "type": [
  204. "product"
  205. ]
  206. }
  207. }
  208. ]
  209. }
  210. },
  211. {
  212. "bool": {
  213. "should": [
  214. {
  215. "bool": {
  216. "must_not": [
  217. {
  218. "exists": {
  219. "field": "product_visibility_str"
  220. }
  221. }
  222. ]
  223. }
  224. },
  225. {
  226. "bool": {
  227. "must_not": [
  228. {
  229. "terms": {
  230. "product_visibility_str": [
  231. "exclude-from-search"
  232. ]
  233. }
  234. }
  235. ]
  236. }
  237. }
  238. ]
  239. }
  240. }
  241. ]
  242. }
  243. },
  244. {
  245. "bool": {
  246. "should": [
  247. {
  248. "bool": {
  249. "must_not": [
  250. {
  251. "terms": {
  252. "type": [
  253. "product"
  254. ]
  255. }
  256. }
  257. ]
  258. }
  259. },
  260. {
  261. "terms": {
  262. "product_stock_str": [
  263. "y"
  264. ]
  265. }
  266. }
  267. ]
  268. }
  269. },
  270. {
  271. "bool": {
  272. "should": [
  273. {
  274. "bool": {
  275. "must_not": [
  276. {
  277. "bool": {
  278. "must": {
  279. "exists": {
  280. "field": "is_excluded_s"
  281. }
  282. }
  283. }
  284. }
  285. ]
  286. }
  287. },
  288. {
  289. "terms": {
  290. "is_excluded_s": [
  291. "n"
  292. ]
  293. }
  294. }
  295. ]
  296. }
  297. },
  298. {
  299. "bool": {
  300. "must_not": [
  301. {
  302. "terms": {
  303. "_id": [
  304. "wpsolr_doc_id_attachment"
  305. ]
  306. }
  307. }
  308. ]
  309. }
  310. }
  311. ]
  312. }
  313. }
  314. }
  315. }
  316. }
  317. },
  318. "post_filter": {
  319. "bool": {
  320. "must": [
  321. {
  322. "bool": {
  323. "must": [
  324. {
  325. "terms": {
  326. "type": [
  327. "product"
  328. ]
  329. }
  330. }
  331. ]
  332. }
  333. }
  334. ]
  335. }
  336. },
  337. "aggs": {
  338. "_price_f": {
  339. "filter": {
  340. "bool": {
  341. "must": [
  342. {
  343. "bool": {
  344. "must": [
  345. {
  346. "terms": {
  347. "type": [
  348. "product"
  349. ]
  350. }
  351. }
  352. ]
  353. }
  354. }
  355. ]
  356. }
  357. },
  358. "aggs": {
  359. "_price_f": {
  360. "filter": {
  361. "match_all": {}
  362. },
  363. "aggs": {
  364. "_price_f": {
  365. "stats": {
  366. "field": "_price_f"
  367. }
  368. }
  369. }
  370. }
  371. }
  372. },
  373. "product_brand_str": {
  374. "filter": {
  375. "bool": {
  376. "must": [
  377. {
  378. "bool": {
  379. "must": [
  380. {
  381. "terms": {
  382. "type": [
  383. "product"
  384. ]
  385. }
  386. }
  387. ]
  388. }
  389. }
  390. ]
  391. }
  392. },
  393. "aggs": {
  394. "product_brand_str": {
  395. "filter": {
  396. "match_all": {}
  397. },
  398. "aggs": {
  399. "product_brand_str": {
  400. "terms": {
  401. "field": "product_brand_str",
  402. "size": 20
  403. }
  404. }
  405. }
  406. }
  407. }
  408. },
  409. "pa_gender_str": {
  410. "filter": {
  411. "bool": {
  412. "must": [
  413. {
  414. "bool": {
  415. "must": [
  416. {
  417. "terms": {
  418. "type": [
  419. "product"
  420. ]
  421. }
  422. }
  423. ]
  424. }
  425. }
  426. ]
  427. }
  428. },
  429. "aggs": {
  430. "pa_gender_str": {
  431. "filter": {
  432. "match_all": {}
  433. },
  434. "aggs": {
  435. "pa_gender_str": {
  436. "terms": {
  437. "field": "pa_gender_str",
  438. "size": 20
  439. }
  440. }
  441. }
  442. }
  443. }
  444. },
  445. "pa_color_str": {
  446. "filter": {
  447. "bool": {
  448. "must": [
  449. {
  450. "bool": {
  451. "must": [
  452. {
  453. "terms": {
  454. "type": [
  455. "product"
  456. ]
  457. }
  458. }
  459. ]
  460. }
  461. }
  462. ]
  463. }
  464. },
  465. "aggs": {
  466. "pa_color_str": {
  467. "filter": {
  468. "match_all": {}
  469. },
  470. "aggs": {
  471. "pa_color_str": {
  472. "terms": {
  473. "field": "pa_color_str",
  474. "size": 20
  475. }
  476. }
  477. }
  478. }
  479. }
  480. },
  481. "pa_health-facts_str": {
  482. "filter": {
  483. "bool": {
  484. "must": [
  485. {
  486. "bool": {
  487. "must": [
  488. {
  489. "terms": {
  490. "type": [
  491. "product"
  492. ]
  493. }
  494. }
  495. ]
  496. }
  497. }
  498. ]
  499. }
  500. },
  501. "aggs": {
  502. "pa_health-facts_str": {
  503. "filter": {
  504. "match_all": {}
  505. },
  506. "aggs": {
  507. "pa_health-facts_str": {
  508. "terms": {
  509. "field": "pa_health-facts_str",
  510. "size": 20
  511. }
  512. }
  513. }
  514. }
  515. }
  516. },
  517. "flat_hierarchy_product_cat_str": {
  518. "filter": {
  519. "bool": {
  520. "must": [
  521. {
  522. "bool": {
  523. "must": [
  524. {
  525. "terms": {
  526. "type": [
  527. "product"
  528. ]
  529. }
  530. }
  531. ]
  532. }
  533. }
  534. ]
  535. }
  536. },
  537. "aggs": {
  538. "flat_hierarchy_product_cat_str": {
  539. "filter": {
  540. "match_all": {}
  541. },
  542. "aggs": {
  543. "flat_hierarchy_product_cat_str": {
  544. "terms": {
  545. "field": "flat_hierarchy_product_cat_str",
  546. "size": 20
  547. }
  548. }
  549. }
  550. }
  551. }
  552. }
  553. }
  554. }
  555. "aggregations": {
  556. "product_brand_str": {
  557. "doc_count": 213,
  558. "product_brand_str": {
  559. "doc_count": 213,
  560. "product_brand_str": {
  561. "doc_count_error_upper_bound": 0,
  562. "sum_other_doc_count": 0,
  563. "buckets": [
  564. {
  565. "key": "Ray-Ban",
  566. "doc_count": 38
  567. },
  568. {
  569. "key": "Polaroid",
  570. "doc_count": 29
  571. },
  572. {
  573. "key": "Carrera",
  574. "doc_count": 15
  575. },
  576. {
  577. "key": "Vogue",
  578. "doc_count": 15
  579. },
  580. {
  581. "key": "Swarovski",
  582. "doc_count": 10
  583. },
  584. {
  585. "key": "Moschino",
  586. "doc_count": 9
  587. },
  588. {
  589. "key": "Prada Sport",
  590. "doc_count": 6
  591. },
  592. {
  593. "key": "Bvlgari",
  594. "doc_count": 5
  595. },
  596. {
  597. "key": "Polo Ralph Lauren",
  598. "doc_count": 4
  599. },
  600. {
  601. "key": "Versace",
  602. "doc_count": 4
  603. },
  604. {
  605. "key": "Prada",
  606. "doc_count": 3
  607. },
  608. {
  609. "key": "Michael Kors",
  610. "doc_count": 2
  611. },
  612. {
  613. "key": "Montblanc",
  614. "doc_count": 2
  615. },
  616. {
  617. "key": "Cartier",
  618. "doc_count": 1
  619. },
  620. {
  621. "key": "Lacoste",
  622. "doc_count": 1
  623. },
  624. {
  625. "key": "Roberto Cavalli",
  626. "doc_count": 1
  627. },
  628. {
  629. "key": "Tommy Hilfiger",
  630. "doc_count": 1
  631. },
  632. {
  633. "key": "Yves Saint Laurent",
  634. "doc_count": 1
  635. }
  636. ]
  637. }
  638. }
  639. },
  640. "pa_health-facts_str": {
  641. "doc_count": 213,
  642. "pa_health-facts_str": {
  643. "doc_count": 213,
  644. "pa_health-facts_str": {
  645. "doc_count_error_upper_bound": 0,
  646. "sum_other_doc_count": 0,
  647. "buckets": []
  648. }
  649. }
  650. },
  651. "_price_f": {
  652. "doc_count": 213,
  653. "_price_f": {
  654. "doc_count": 213,
  655. "_price_f": {
  656. "count": 219,
  657. "min": 173.25,
  658. "max": 10421.25,
  659. "avg": 678.4438337212828,
  660. "sum": 148579.19958496094
  661. }
  662. }
  663. },
  664. "pa_gender_str": {
  665. "doc_count": 213,
  666. "pa_gender_str": {
  667. "doc_count": 213,
  668. "pa_gender_str": {
  669. "doc_count_error_upper_bound": 0,
  670. "sum_other_doc_count": 0,
  671. "buckets": []
  672. }
  673. }
  674. },
  675. "flat_hierarchy_product_cat_str": {
  676. "doc_count": 213,
  677. "flat_hierarchy_product_cat_str": {
  678. "doc_count": 213,
  679. "flat_hierarchy_product_cat_str": {
  680. "doc_count_error_upper_bound": 0,
  681. "sum_other_doc_count": 0,
  682. "buckets": [
  683. {
  684. "key": "Fashion",
  685. "doc_count": 213
  686. },
  687. {
  688. "key": "Fashion->Men",
  689. "doc_count": 213
  690. },
  691. {
  692. "key": "Fashion->Men->Eyewear",
  693. "doc_count": 213
  694. },
  695. {
  696. "key": "Fashion->Men->Eyewear->Eyeglasses",
  697. "doc_count": 213
  698. }
  699. ]
  700. }
  701. }
  702. },
  703. "pa_color_str": {
  704. "doc_count": 213,
  705. "pa_color_str": {
  706. "doc_count": 213,
  707. "pa_color_str": {
  708. "doc_count_error_upper_bound": 0,
  709. "sum_other_doc_count": 2,
  710. "buckets": [
  711. {
  712. "key": "Clear\/Havana",
  713. "doc_count": 66
  714. },
  715. {
  716. "key": "Clear\/Black",
  717. "doc_count": 40
  718. },
  719. {
  720. "key": "Clear\/Gold",
  721. "doc_count": 14
  722. },
  723. {
  724. "key": "Clear\/Brown",
  725. "doc_count": 11
  726. },
  727. {
  728. "key": "Clear\/Blue",
  729. "doc_count": 9
  730. },
  731. {
  732. "key": "Clear\/Silver",
  733. "doc_count": 9
  734. },
  735. {
  736. "key": "Clear\/Purple",
  737. "doc_count": 8
  738. },
  739. {
  740. "key": "Clear",
  741. "doc_count": 5
  742. },
  743. {
  744. "key": "Clear\/Gray",
  745. "doc_count": 5
  746. },
  747. {
  748. "key": "Clear\/Grey",
  749. "doc_count": 5
  750. },
  751. {
  752. "key": "Clear\/Pink",
  753. "doc_count": 5
  754. },
  755. {
  756. "key": "Clear\/Green",
  757. "doc_count": 3
  758. },
  759. {
  760. "key": "Clear\/Light blue",
  761. "doc_count": 3
  762. },
  763. {
  764. "key": "Clear\/Multicolor",
  765. "doc_count": 3
  766. },
  767. {
  768. "key": "Clear\/Red",
  769. "doc_count": 3
  770. },
  771. {
  772. "key": "Brown\/Taupe",
  773. "doc_count": 1
  774. },
  775. {
  776. "key": "Clear\/Red &amp; Black",
  777. "doc_count": 1
  778. },
  779. {
  780. "key": "Clear\/Rose",
  781. "doc_count": 1
  782. },
  783. {
  784. "key": "Clear\/Transparent",
  785. "doc_count": 1
  786. },
  787. {
  788. "key": "Clear\/White",
  789. "doc_count": 1
  790. }
  791. ]
  792. }
  793. }
  794. }
  795. }
  796. }
  797.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement