how to delete on column of a doc in solr

2013-06-27 Thread anurag.jain
In my solr schema there is one dynamic field.

   
So I have one doc value,

docs: [
{
last_name: "Jain",
state_name: "rajasthan",
mobile_no: "234534564621",
id: "4",
jobs_6554: "6554",

},...]
Now I just want to delete one column, means jobs_6554 not the complete doc.
How it can possible in solr.

So after delete, docs will be.

docs: [
{
last_name: "Jain",
state_name: "rajasthan",
mobile_no: "234534564621",
id: "4"
},...]



--
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-delete-on-column-of-a-doc-in-solr-tp4073587.html
Sent from the Solr - User mailing list archive at Nabble.com.


Dynamic Field

2013-09-08 Thread anurag.jain
Hi all,

I am using solr dynamic field. i am storing data in the following format:-


idbatch_*job_* 


So for a doc, data is storing like:-

--
id  batch_21   job_21 job_22   batch_22  ...
--
1   120   01   121  ...
--

Using luke request handler i found that currently there are more than 5k
fields and 300 docs. And fields are always increasing because of dynamic
field. 
So i am worried about solr performance or any unknown issues which can come
to solr. If somebody had experienced please tell me. Please tell the correct
solution to handle these issues.

are there any alternatives of dynamic fields. Can we store information like
below ?

-
idjobs  batch
-
21   {21:0,22:1}{21:120,22:121}
-



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Dynamic-Field-tp4088775.html
Sent from the Solr - User mailing list archive at Nabble.com.


CommaSplit and query is free text search

2013-03-21 Thread anurag.jain
I have field named as  worked_company_name.

in json input i am giving value like

{
"worked_company_name":["Dell","Microsoft,Facebook"] 
}

-> data is very bad. means it may have comma etc.





so can you please tell me how type should ? 


comaSplitwithsearch ?? 


thanks 






--
View this message in context: 
http://lucene.472066.n3.nabble.com/CommaSplit-and-query-is-free-text-search-tp4049734.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: CommaSplit and query is free text search

2013-03-23 Thread anurag.jain
I tried with text_general type, it is working according to my need, with
multivalue = true.

 


  




  
  




  









--
View this message in context: 
http://lucene.472066.n3.nabble.com/CommaSplit-and-query-is-free-text-search-tp4049734p4050708.html
Sent from the Solr - User mailing list archive at Nabble.com.


Which tokenizer or analizer should use and field type

2013-04-12 Thread anurag.jain
my schema file is :












  




  
  




  






values are like,

title: "Assistant Coach/ Junior Assistant"
body: "  Oil India Ltd. invites
applications for the post of Sr Medical Officer (Paediatrics)
 www.freshersworld.com Qualification :
MD (Paediatrics)  No of Post : 1UR  Pay Scale : Rs 32900 -58000   Age as
on 11.04.2013 : 32 yrs Selection Procedure :
Selection for the above post will be based on Written Test, Group
Discussion (GD), Viva-Voce and Medical Examination. "

company_profile: "The story of Oil India Limited (OIL)
traces and symbolises the development and growth of the Indian petroleum
industry. From the discovery of crude oil in the far east of India at
Digboi, Assam in 1889 to its present status as a fully integrated upstream
petroleum company, OIL has come far, crossing many milestones.",

company_name: "Oil India Limited",



please give me suggestion about field type i should use.

keyword is copyfield i am using for search. i do not want to search on html
content.

How search will happen ?


if i give words to search

project assistant,manager


it only should give me keyword have project assistance or manager.

right now it is giving me results which has project or assistance or manager
that is wrong case for me.

Please give me solution for it. I have to complete that task by today thats
why i am not able to do research on it. 


need field type definitions for each field. and how search query i'll write
?? 

thanks in advance






--
View this message in context: 
http://lucene.472066.n3.nabble.com/Which-tokenizer-or-analizer-should-use-and-field-type-tp4055591.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Which tokenizer or analizer should use and field type

2013-04-13 Thread anurag.jain
I tried both way.
(project AND assistant) OR manager 

"project assistant"~5 OR manager 


it is working properly.
but i got problem.

if i give query projec assistant, then it is not able to find out. 

and what is meaning of ~5 ?

If i write *projec assistant* then it is able to find out but it give
project or assistant. 

My objective is to search like - Mysql like operator, %search word% .

How to write query which is exactly like , Mysql like operator. 

Thanks 

Need help As soon as possible






--
View this message in context: 
http://lucene.472066.n3.nabble.com/Which-tokenizer-or-analizer-should-use-and-field-type-tp4055591p4055833.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Which tokenizer or analizer should use and field type

2013-04-13 Thread anurag.jain
Hi, If you can help me in. It will solve my problem.

keyword:(*assistant AND coach*) giving me 1 result.

keyword:(*iit AND kanpur*)  giving me 2 result.

But query:- 

keyword:(*assistant AND coach* OR (*iit AND kanpur*)) giving me only 1
result.

Also i tried. keyword:(*assistant AND coach* OR (*:* *iit AND kanpur*))
giving me only 1 result. Don't know why. 

How query should look like ?? please help me to find out solution. 

Thanks in advance.





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Which-tokenizer-or-analizer-should-use-and-field-type-tp4055591p4055837.html
Sent from the Solr - User mailing list archive at Nabble.com.


SOLR CSV output in custom order

2013-06-06 Thread anurag.jain
I want output of csv file in proper order.  when I use wt=csv  it gives
output in random order. Is there any way to get output in proper format. 

Thanks 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SOLR-CSV-output-in-custom-order-tp4068527.html
Sent from the Solr - User mailing list archive at Nabble.com.


Download CSV, Strange thing is happening !!

2013-06-06 Thread anurag.jain
I have two field in solr, Named as 10th_mark, 12th_mark. Now I want to
download that field in csv so i tried,

http://localhost:8983/solr?q=*:*&wt=csv&start=0&rows=10&fl=10th_mark,12th_mark

But output is something like that,

th_mark
""
""
""
""
""
""
""
""
""
""



But If i put *th_mark it is giving me correct output. But If I Put * then
output comes in Random order, Please give me a way to solve this type of
problem.

Please Reply ASAP,

Thanks 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Download-CSV-Strange-thing-is-happening-tp4068599.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Download CSV, Strange thing is happening !!

2013-06-06 Thread anurag.jain
fl=field(10th_mark),field(12th_mark) 

if I use wt=csv, It is giving me No output, when wt=json it is giving me
output. 




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Download-CSV-Strange-thing-is-happening-tp4068599p4068633.html
Sent from the Solr - User mailing list archive at Nabble.com.


Auto completion

2013-01-10 Thread anurag.jain
Hello,
I am new solr user. i updated schema.xml and solrconfig.xml now in this link 
"http://localhost:8983/solr/browse"; auto completion is not working :( .
please tell me how should i modify that file so i can do my work(auto
completion). please reply urgent.

thanks   



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Auto-completion-tp4032267.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Auto completion

2013-01-11 Thread anurag.jain
in solrconfig.xml 

 
   edismax
   
  text^0.5 last_name^1.0 first_name^1.2 course_name^7.0 id^10.0
branch_name^1.1 hq_passout_year^1.4
  course_type^10.0 institute_name^5.0 qualification_type^5.0
mail^2.0 state_name^1.0
   
   text
   100%
   *:*
   10
   *,score

   
 text^0.5 last_name^1.0 first_name^1.2 course_name^7.0 id^10.0
branch_name^1.1 hq_passout_year^1.4
  course_type^10.0 institute_name^5.0 qualification_type^5.0
mail^2.0 state_name^1.0
   
   text,last_name,first_name,course_name,id,branch_name,hq_passout_year,course_type,institute_name,qualification_type,mail,state_name
   3

   
   on
   is_top_institute
   course_name
  
   cgpa
   0
   10
   2




and in schema.xml




   
   
   
...
...
...




 
 ...
 ...
 ...


so please now tell me what will be JavaScript (terms.fl parameter) ? and
conf/velocity/head.vm, and also the 'name' reference in suggest.vm. 


please reply .. and thanks for previous reply ..  :-)



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Auto-completion-tp4032267p4032450.html
Sent from the Solr - User mailing list archive at Nabble.com.


Regarding Copyfield

2013-01-14 Thread anurag.jain
hi

in copy field i am not storing first_name last_name etc. but in dest =
"text" it is showing first_name .. etc. in auto suggestion mode.

my copy field are ..
   
   
   
   ...

and field are ..
 
   
   
   
   
   
   ...


and also i want to make own field like text  named as "autosuggest" then it
is also not working for autosuggestion. 



please reply urgent





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Regarding-Copyfield-tp4033385.html
Sent from the Solr - User mailing list archive at Nabble.com.


problem in Velocity spell output

2013-01-14 Thread anurag.jain
if i am giving input antrag then it is showing following line.

Did you mean
{collationQuery=anurag,hits=1,misspellingsAndCorrections={aturag=anurag}}? 


i want output in format of 

Did you mean anurag ? 


how can i solve it please give me solution..

Thanks in advance

Reply please urgent



--
View this message in context: 
http://lucene.472066.n3.nabble.com/problem-in-Velocity-spell-output-tp4033390.html
Sent from the Solr - User mailing list archive at Nabble.com.


MultiValue

2013-01-17 Thread anurag.jain
my json file look like

[ { "last_name" : "jain", "training_skill":["c", "c++", "php,java,.net"] }]

can u please suggest me how should i declare field in schema for
"trainingskill" field



please reply 

urgent





--
View this message in context: 
http://lucene.472066.n3.nabble.com/MultiValue-tp4034305.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: MultiValue

2013-01-17 Thread anurag.jain
  [ { "last_name" : "jain", "training_skill":["c", "c++", "php,java,.net"] }
]

actually i want to tokenize in   c c++ php java .net


so through this i can make them as facet.


but problem is in list
"training_skill":["c", "c++", *"php,java,.net"*]






--
View this message in context: 
http://lucene.472066.n3.nabble.com/MultiValue-tp4034305p4034316.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: MultiValue

2013-01-17 Thread anurag.jain
actually  [ { "last_name" : "jain", "training_skill":*["c", "c++",
"php,java,.net"]* }  ]   training_skill is list. and if i want to store in
string field type then it will include [ and , also. so how to avoid ? or it
will not. 


or do you have any other field type definition through which my work will be
easy. 





--
View this message in context: 
http://lucene.472066.n3.nabble.com/MultiValue-tp4034305p4034327.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: MultiValue

2013-01-17 Thread anurag.jain
@Alexandre Rafalovitch Thanks. 

yeah you got my point.


training_skill:["c", "c++", "php", "java", ".net"]
but it is not possible for me to split "php,java,.net"  because data can
very and data is very large. i mean i have to perform on 5 line  data. 

it might come["c++,php,java",".net","c#,ruby", "python  java"] like that. 

so i have to perform on this list. just want to ignore [ " , ] 











--
View this message in context: 
http://lucene.472066.n3.nabble.com/MultiValue-tp4034305p4034339.html
Sent from the Solr - User mailing list archive at Nabble.com.


Updating data

2013-02-04 Thread anurag.jain
i already indexing 180 data in solr index. all files were in json format.

so data was like -

[
{
"id":1,
"first_name":"anurag",
"last_name":"jain",
...
},

{
"id":2,
"first_name":"abhishek",
"last_name":"jain",
...
}, ...
]


now i have to add a field in data like



[
{
"id":1,
"first_name":"anurag",
"last_name":"jain",
"new_field":"xvz",
...
},

{
"id":2,
"first_name":"abhishek",
"last_name":"jain",
"new_field":"xvz",
...
}, ...
]


but i want that :
my json file like that
[
{
"id":1,
"new_field":"xvz"
},
{
"id":2,
"new_field":"xvz"
}
]

so it automatically update in solr like this file is doing.

[
{
"id":1,
"first_name":"anurag",
"last_name":"jain",
"new_field":"xvz",
...
},

{
"id":2,
"first_name":"abhishek",
"last_name":"jain",
"new_field":"xvz",
...
}, ...
]



any solutions ? please reply



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Updating-data-tp4038492.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Updating data

2013-02-06 Thread anurag.jain
Hi, Thanks for reply.

But i was doing same thing but whenver i tried to update previous field
automatically delete. :(

I am not getting why ? 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Updating-data-tp4038492p4038833.html
Sent from the Solr - User mailing list archive at Nabble.com.


OR OR OR

2013-02-06 Thread anurag.jain
in my query there are many OR's now after 79 or 80 ORS it gives error that
url is very large. 


http://xvz/solr/select?q=*:*&fq=institute_name:"xyz"; OR
institute_name:"sfsda" OR institute_name:"sdfsaf" .. 


i found a solution that we can give query through POST. but i don't know how
? can you please tell me how to do this. please reply. :( urgent 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/OR-OR-OR-tp4038836.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Updating data

2013-02-07 Thread anurag.jain
this was my previous data.[
   {
  "id":"1",
  "movie_name":"Twelve Monkeys",
  "genre":[
 "Children's",
 "Comedy",
 "Drama",
 "Sci-Fi"
  ],
  "release_year":"1995",
  "url":"http://us.imdb.com/M/title-exact?Twelve%20Monkeys%20(1995)",
  "rating":8.1,
  "total_viewed":432121
   },
   {
  "id":"2",
  "movie_name":"Toy Story",
  "genre":[
 "Children's",
 "Comedy",
 "Crime"
  ],
  "release_year":"1995",
  "url":"http://us.imdb.com/M/title-exact?Toy%20Story%20(1995)",
  "rating":7.1,
  "total_viewed":5423
   },
   {
  "id":"3",
  "movie_name":"Copycat",
  "genre":[
 "Children's",
 "Comedy",
 "Drama",
 "Horror"
  ],
  "release_year":"1998",
  "url":"http://us.imdb.com/M/title-exact?Copycat%20(1998)",
  "rating":2.1,
  "total_viewed":54323
   },
   {
  "id":"4",
  "movie_name":"Crumb",
  "genre":[
 "Comedy",
 "Drama",
 "Sci-Fi"
  ],
  "release_year":"1998",
  "url":"http://us.imdb.com/M/title-exact?Crumb%20(1998)",
  "rating":4.1,
  "total_viewed":5123
   },
   {
  "id":"5",
  "movie_name":"Young Guns",
  "genre":[
 "Comedy",
 "Drama",
 "Sci-Fi",
 "War"
  ],
  "release_year":"2012",
  "url":"http://us.imdb.com/M/title-exact?Young%20Guns%20(1988)",
  "rating":9.1,
  "total_viewed":524323
   }
]


i also want to add [
   {
  "id":"1",
  "is_good":1
   },
   {
  "id":"2",
   "is_good":1
   },
   {
  "id":"3",
  "is_good":0
   },

   {
  "id":"4",
  "is_good":0
   },
   {
  "id":"5",
"is_good":1   
   }
]


and here is my schema.xml part... 


  










when i try to update through 2nd data it erase first data.. 




please reply






--
View this message in context: 
http://lucene.472066.n3.nabble.com/Updating-data-tp4038492p4039178.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Updating data

2013-02-08 Thread anurag.jain
i have question 

what if id not exits in previous data ? ?

like 
[
  {
  "id":"6",
   "is_good":{"add":"1"}
   }
] 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Updating-data-tp4038492p4039190.html
Sent from the Solr - User mailing list archive at Nabble.com.


Indexed And Stored

2013-02-12 Thread anurag.jain
hello, 

in my schema



and i updated 18 data. 


now i need indexed="true" for all old data. 

i need solution  

please someone help me out. 

please reply urgent!!
thanks  



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Indexed-And-Stored-tp4039893.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Indexed And Stored

2013-02-12 Thread anurag.jain
Actually problem is i updated data first. and then i have to add new fields
so i made another json file 

[
{
"id":"2131",
"newfield":{"add":"2121"}
},

{
"id":"21",
"newfield":{"add":"21"}
}
]



now i have two different files. so if i try to update previous file for
indexed = true. it erase new field





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Indexed-And-Stored-tp4039893p4039930.html
Sent from the Solr - User mailing list archive at Nabble.com.


Send Input Through Json into solr

2013-02-13 Thread anurag.jain
hey,

I want to send query input through json file do not want to give query
parameter. so is there any way to send. 


Like if i give query parameter it give response and in response there is a
key call as parameter. so if i send that parameter through json. it will
easy for me.

let say input parameter is
http://localhost/solr/select?q=*:*&wt=json&start=0&fq=course_id:\"18\";
it give me response.  


responseHeader":{
"status":0,
"QTime":2,
"params":{
  "indent":"on",
  "start":"0",
  "q":"*:*",
  "wt":"json",
  "fq":"course_id:\\\"18\\\""}
},
  "response":{"numFound":729,"start":0,"docs":[
  {
  ...
  },
  {
  ...
  }
  ]




i want to send this json file 

{
  "indent":"on",
  "start":"0",
  "q":"*:*",
  "wt":"json",
  "fq":"course_id:\\\"18\\\""
}

is there any way to do this ? ? 

please reply. it will help me out with lots of problems 


Thanks --- 






--
View this message in context: 
http://lucene.472066.n3.nabble.com/Send-Input-Through-Json-into-solr-tp4040186.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Updating data

2013-02-18 Thread anurag.jain
Hi,

i got a problem.

problem is i have json file 

[
  {
  "id":"5",
   "is_good":{"add":"1"}
   },
  {
  "id":"1",
   "is_good":{"add":"1"}
   },
  {
  "id":"2",
   "is_good":{"add":"1"}
   },
  {
  "id":"3",
   "is_good":{"add":"1"}
   }
]


now due to stopping of tomcat only one of doc ["id":5]added in solr. 

now if i am trying again to post this file for update. it is giving me error
"multivalue ...".

becoz "id":5 already updated ..   due to this remaining id is not updating
in solr. i have 25 lakh doc  in a json file. please give me some idea.. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Updating-data-tp4038492p4041123.html
Sent from the Solr - User mailing list archive at Nabble.com.


TIMESTAMP

2013-02-18 Thread anurag.jain
Hi all,

I have json file in which there is field name last_login and value of that
field in timestamp. 

I want to store that value in timestamp. do not want to change field type. 

Now question is how to store timestamp so that when i need output in
datetime format it give date time format and whenver i need output in
timestamp format it give timestamp format. 


Please Reply it is very urgent --- i have to do this task today itself. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/TIMESTAMP-tp4041225.html
Sent from the Solr - User mailing list archive at Nabble.com.


SOLR Performance question

2013-02-19 Thread anurag.jain
Hi everybody.

I stored 42 field in solr. 

and indexed  34 field. 

and going to store 4-6 coloum more  and indexed 3-5 

and total doc i have stored --- 250 

and may be it will reach upto 500

SO question is, 

Will i get any problem ?? my machine is m1.small in amazon ec2. 

so should i shift machine to m1.large   for 250 data  or for 500??
or it will work for now ?? 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SOLR-Performance-question-tp4041245.html
Sent from the Solr - User mailing list archive at Nabble.com.


Search data who does not have "x" field

2013-03-13 Thread anurag.jain
Hi all,

I am facing a problem. 

Problem is:

I have updated 250 data to solr. 


and some of data have "category" field and some of don't have.

for example.


{
"id":"321",
"name":"anurag",
"category":"x"
},
{
"id":"3",
"name":"john"
}


now i want to search that data who does not have that field. 

what query should like. 


please reply 

It is very urgent - i have to complete this task by today itself 

thanks in advance.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Search-data-who-does-not-have-x-field-tp4046959.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Search data who does not have "x" field

2013-03-13 Thread anurag.jain
"another solution would be to add a boolean field, hasCategory, and use it
for filtering 
q=&fq=hasCategory:true "


I am not getting result.


i am trying

localhost:8983/search?q=*:*&fq=category:true

it is giving zero result.

by the way first technique is working fine.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Search-data-who-does-not-have-x-field-tp4046959p4046967.html
Sent from the Solr - User mailing list archive at Nabble.com.


New-Question On Search data who does not have "x" field

2013-03-14 Thread anurag.jain
My prev question was

I have updated 250 data to solr. 

and some of data have "category" field and some of don't have. 

for example. 

{ 
"id":"321", 
"name":"anurag", 
"category":"30" 
}, 
{ 
"id":"3", 
"name":"john" 
} 

now i want to search that docs who does not have that field. 
what query should like. 
 
I got an answer.

i can use http://localhost:8983/search?q=*:*&fq=-category:[* TO *]


but now i am facing a problem. that i want to search all docs .. who does
not have category field  or category field value = 20

I wrote following query. 

http://localhost:8983/search?q=*:*&wt=json&start=0&fq=category:"20"; OR
-category:[* TO *]

but it is giving me zero output.

http://localhost:8983/search?q=*:*&wt=json&start=0&fq=category:"20";  ->
output = 2689

http://localhost:8983/search?q=*:*&wt=json&start=0&fq=-category:[* TO *]  ->
output = 2644684




what is problem ... am i doing some mistakes ??



--
View this message in context: 
http://lucene.472066.n3.nabble.com/New-Question-On-Search-data-who-does-not-have-x-field-tp4047270.html
Sent from the Solr - User mailing list archive at Nabble.com.