Click here to Skip to main content
15,887,425 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to create lucene.net index in database Pin
Eddy Vluggen14-Jul-14 5:29
professionalEddy Vluggen14-Jul-14 5:29 
Questionhelp C# AND SQL Server Pin
ozanadiaa14-Jul-14 3:39
ozanadiaa14-Jul-14 3:39 
AnswerRe: help C# AND SQL Server Pin
Pete O'Hanlon14-Jul-14 3:42
mvePete O'Hanlon14-Jul-14 3:42 
AnswerRe: help C# AND SQL Server Pin
Dilan Shaminda14-Jul-14 7:07
professionalDilan Shaminda14-Jul-14 7:07 
QuestionRe: help C# AND SQL Server Pin
ZurdoDev14-Jul-14 8:55
professionalZurdoDev14-Jul-14 8:55 
AnswerRe: help C# AND SQL Server Pin
PIEBALDconsult14-Jul-14 9:16
mvePIEBALDconsult14-Jul-14 9:16 
AnswerRe: help C# AND SQL Server Pin
Dave Kreskowiak14-Jul-14 10:35
mveDave Kreskowiak14-Jul-14 10:35 
QuestionRegarding locking trick at the time of indexing data Lucene.net Pin
Tridip Bhattacharjee14-Jul-14 3:31
professionalTridip Bhattacharjee14-Jul-14 3:31 
i got a code which talk about locking trick at the time of indexing data with Lucene.net

private static FSDirectory _directoryTemp;
private static FSDirectory _directory
{
get
{
if (_directoryTemp == null) _directoryTemp = FSDirectory.Open(new DirectoryInfo(_luceneDir));
if (IndexWriter.IsLocked(_directoryTemp)) IndexWriter.Unlock(_directoryTemp);
var lockFilePath = Path.Combine(_luceneDir, "write.lock");
if (File.Exists(lockFilePath)) File.Delete(lockFilePath);
return _directoryTemp;
}
}

but the code looks not very good. can anyone tell me why the above code is checking directory is locked or not....when directory gets locked?

see this line of code if (IndexWriter.IsLocked(_directoryTemp)) IndexWriter.Unlock(_directoryTemp); if directory is locked then it unlock it but what will happen if any index writer is indexing data and directory gets unlock then what will happen? looking for best practice. thanks
tbhattacharjee

AnswerRe: Regarding locking trick at the time of indexing data Lucene.net Pin
Pete O'Hanlon14-Jul-14 3:44
mvePete O'Hanlon14-Jul-14 3:44 
QuestionGuidance for indexing data by Lucene.net Pin
Tridip Bhattacharjee14-Jul-14 1:42
professionalTridip Bhattacharjee14-Jul-14 1:42 
AnswerRe: Guidance for indexing data by Lucene.net Pin
Pete O'Hanlon14-Jul-14 2:05
mvePete O'Hanlon14-Jul-14 2:05 
QuestionCould someone answer me this Pin
Member 1094467914-Jul-14 0:25
Member 1094467914-Jul-14 0:25 
AnswerRe: Could someone answer me this Pin
Pete O'Hanlon14-Jul-14 1:40
mvePete O'Hanlon14-Jul-14 1:40 
QuestionSend command To Printe Pin
Zeyad Jalil12-Jul-14 21:15
professionalZeyad Jalil12-Jul-14 21:15 
SuggestionRe: Send command To Printe Pin
Richard MacCutchan12-Jul-14 21:33
mveRichard MacCutchan12-Jul-14 21:33 
GeneralRe: Send command To Printe Pin
Zeyad Jalil12-Jul-14 22:09
professionalZeyad Jalil12-Jul-14 22:09 
GeneralRe: Send command To Printe Pin
Richard MacCutchan12-Jul-14 22:20
mveRichard MacCutchan12-Jul-14 22:20 
GeneralRe: Send command To Printe Pin
Dave Kreskowiak13-Jul-14 4:40
mveDave Kreskowiak13-Jul-14 4:40 
QuestionAdd other component in c# 2008 Pin
KaKoten12-Jul-14 15:30
KaKoten12-Jul-14 15:30 
AnswerRe: Add other component in c# 2008 Pin
Richard MacCutchan12-Jul-14 21:28
mveRichard MacCutchan12-Jul-14 21:28 
QuestionMutliple ResultSet from Stored Procedure using EF 5.0 Pin
meeram3912-Jul-14 12:57
professionalmeeram3912-Jul-14 12:57 
AnswerRe: Mutliple ResultSet from Stored Procedure using EF 5.0 Pin
Dave Kreskowiak13-Jul-14 4:42
mveDave Kreskowiak13-Jul-14 4:42 
GeneralRe: Mutliple ResultSet from Stored Procedure using EF 5.0 Pin
meeram3913-Jul-14 8:39
professionalmeeram3913-Jul-14 8:39 
QuestionTranslate method in Entity framework not found Pin
meeram3912-Jul-14 7:53
professionalmeeram3912-Jul-14 7:53 
AnswerRe: Translate method in Entity framework not found Pin
Pete O'Hanlon12-Jul-14 8:54
mvePete O'Hanlon12-Jul-14 8:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.