Pagination with grouping in solr

2018-11-19 Thread swap
Document structure of solr document is as mentioned below now i need to get
the document having event_name="product view" and group it by email so that
email is not duplicate.Now on listing the email how may paginate the unique
email.As the query return total number of document not the count of groups

"docs":[ { "id":"1", "email":"xxx...@gmail.com", "gender":"M",
"location":["yyy"], "created":123444, "event_name":"product viewed",
"event_property":"product", "event_value":"sun glassed",
"version":1617201602734587904, "location_str":[""] }, { "id":"4",
"email":"xxx...@gmail.com", "gender":"F", "location":[""],
"created":123447, "event_name":"Add To Cart", "event_property":"Name",
"event_value":"sun glasses", "version":1617202784870858752,
"location_str":[""] }, { "id":"5", "email":"xxx...@gmail.com",
"gender":"M", "location":["k"], "created":123464, "event_name":"Product
Clicked", "event_property":"Category", "event_value":"Contact Lens",
"version":1617202784871907328, "location_str":["l"] } ]



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


solr grouping

2018-12-19 Thread swap
I have document in solr as mentioned below

{
"event_name":"product viewed",

"event_property":["category","product_name","product_code","price","brand","color","discount","is_new_visitor"],
"event_value":["category-sunglasses","product_name-david blake grey
sunglasses","product_code-lcsgdb364x1880gryx""price-590","brand-david
blake","color-grey","discount-70"],
"session_id":"mf154521205475440",
"company_id":"31",
"created":1545212153,
"email":"z...@gmail.com",
"name":""
},
{
"event_name":"product viewed",

"event_property":["category","product_name","product_code","price","brand","color","discount","is_new_visitor"],
"event_value":["category-sunglasses","product_name-david blake grey
sunglasses","product_code-lcsgdb364x1880gryx""price-590","brand-david
blake","color-grey","discount-70"],
"session_id":"mf154521205475440",
"company_id":"31",
"created":1545212153,
"email":"y...@gmail.com",
"name":""
}

i need to query and group email with filtered query fq as mentioned below 

http://solr-url/solr/solr-core/select?q=:&fq=((event_name:"product+viewed"+AND+event_property:"product_name"+AND+event_value:"category-sunglasses")+AND+(event_name:"add+to+cart"+AND+event_property:"product_name"+AND+event_value:"category-sunglasses"))&group.limit=1&group.ngroups=true&group=true&group.field=email

i need filter query
(event_name:"product+viewed"+AND+event_property:"product_name"+AND+event_value:"category-sunglasses")
with "AND" on
event_name:"add+to+cart"+AND+event_property:"product_name"+AND+event_value:"category-sunglasses")

In response i am not getting the email e.g user who as performed both event
e.g "product viewed" and "add to cart".

document have email and activity perform by user in event key.now i need to
make request to group email to find unique email using filter query.i have
used the query mentioned below







--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Difference between AND OR IN FQ

2018-12-19 Thread swap
what is difference between 
http://xxx/solr/core/select?q=*:*&fq=((event_name:"add+to+cart") OR
(event_name:"product+viewed"))

http://x/solr/core/select?q=*:*&fq=((event_name:"add+to+cart") AND
(event_name:"product+viewed"))

document structure 
{
 "event_name":"add to cart",
 "email": ""
}




--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Need to perfom search and group the record on basis of domain,subject,from address and display the count of label i.e inbox,spam

2019-02-01 Thread swap
Need to perfom search and group the record on basis of domain,subject,from
address and display the count of label i.e inbox,spam
  and label status i.e read and unread with it.The label and label status
should be displayed as percentage.

Scenorio 1
Document structure is as mentioned below indexed in solr. message_id is
unique field in solr
  {
"email_date_time": 1548922689,
"subject": "abcdef",
"created": 1548932108,
"domain": ".com",
"message_id": "123456789ui",
"label": "inbox",
"from_address": xxxbc.com",
"email": "g...@gmail.com",
"label_status": "unread"
  }

  {
"email_date_time": 1548922689,
"subject": "abcdef",
"created": 1548932108,
"domain": ".com",
"message_id": "zxiu22",
"label": "inbox",
"from_address": xxxbc.com",
"email": "g...@gmail.com",
"label_status": "unread"
  }

  {
"email_date_time": 1548922689,
"subject": "defg",
"created": 1548932108,
"domain": ".com",
"message_id": "ftyuiooo899",
"label": "inbox",
"from_address": xxxbc.com",
"email": "f...@gmail.com",
"label_status": "unread"
  }

I have below mentioned point to be implemented

1. Need to perfom search and group the record on basis of
domain,subject,from address and display the count of label i.e inbox,spam
  and label status i.e read and unread with it.The label and label status
should be displayed as percentage.

 
2. Need to paginate the record along with the implementation 1


Display will be as mentioned below


1. domain name : @ subject:hello from addredd: abcd@i

inbox percentage : 20% spam percentage : 80% 
read percentage  : 30%  unread percentage : 70%

2. domain name : @ subject:hi from addredd: abcd@i

inbox percentage : 20% spam percentage : 80% 
read percentage  : 30%  unread percentage : 70%


3. domain name : @ subject:where from addredd: abcd@i

inbox percentage : 20% spam percentage : 80% 
read percentage  : 30%  unread percentage : 70%



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Ignore Field from indexing

2018-04-10 Thread swap
Hi

I have document indexed. Email-Id is unique key in document. On updating I
need to ignore few field if its already exists. Please let me know if
something more required.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


NLP Search with Solr

2016-01-29 Thread Swap Social
Hi

I am in the Facebook advertising domain, trying to build a natural language
search engine using Apache Solr and IBM Watson Retrieve and Rank service. I
currently have my data in a Postgresql database, where the tables are named
by company, fb_ad_revenue, targeting_info, etc. which are updated daily. I
would like the system to support queries like what are my top performing
ads, revenue vs spend for the last five days, etc. How should I go
about importing
the data into Solr?

Swapnil