2015년 11월 26일 목요일

Apache Solr 컬럼 JOIN 검색...


19down voteaccepted
This comment says it's possible by using:
{!join from=fromField to=toField fromIndex=fromCoreName}fromQuery
I tried it myself, and here's a more detailed example: Have two cores
  • brands {id,name}
  • products {id, name, brand_id}
BRANDS: {1, Apple}, {2, Samsung}, {3, HTC}
PRODUCTS: {1, iPhone, 1}, {2, iPad, 1}, {3, Galaxy S3, 2}, {4, Galaxy Note, 2}, {5, One X, 3}
http://example.com:8999/solr/brands/select?q=*:*&fq={!join from=brand_id to=id fromIndex=products}name:iPad
This translates to something like:
SELECT b.* FROM brands b
       INNER JOIN products p ON b.id=p.brand_id
       WHERE p.name="iPad";
Result will be: {id: "1", name:"Apple"}


이건 컬럼 조인 검색

댓글 없음:

댓글 쓰기

[낯선] 2026.06.20 이태원 MZK MuzikBar 공연

간만의 공연 이태원 비틀즈가 이전하여 MZK MuzikBar 로 새 단장 오픈을 한 뒤로 2번째 공연 새 베이시스트가 합류한 뒤로 첫 공연이기도 함.. 이래저래 틀린 부분도 많지만.. 그래도 간만에 그럭저럭 잘했다.. https://www.youtub...