...or perhaps the underlying Lucene.Net.
The Lucene index includes a field named _logicalname which contains the entity type, e.g. kbarticle, incident.
You think and are told that you can search for a specific value in a field - and thereby limit your results to entities of a particular type - by adding "_logicalname:kbarticle" into your query string.
You might find it doesn't work.
The reason appears to be that "kbarticle" gets truncated to "kbarticl" in Lucene.Net's search query. (I'm guessing it's to do with stemming or something.)
The simple fix is to wildcard the value a bit by appending an asterisk. A search for "_logicalname:kbarticle*" works. (Actually, a search for kbarticlee seemed to as well.)
(There are other programmatic ways to restrict the entities that are searched for, but in my case I wanted to be able to perform a null or blank search that would return results for all entities of a particular type. You can't actually search for null or blank, but a _logicalname search was a suitable equivalent.)
Thursday, 11 December 2014
Monday, 6 January 2014
Thinkpad W500 hard drive upgrade problems.
I upgraded to a 480GB Crucial M500 SSD. Window 7. Lenovo Thinkpad W500.
(Used Windows Backup and Restore to create a System Image, then replaced the hard disk, then restored. Tried various other copy-tools but they wouldn't work via the SATA interface plugged into my USB socket. Note that Windows *did not* get the hard-drive alignment correct when it did the restore. I checked the alignment using a tool called AS SSD Benchmark, then fixed it using the MiniTool Partition Wizard.)
All seemed to be running well enough, but Windows Update wouldn't work and the underlying problem was the "The Cryptographic Services service failed to initialize the Catalog Database. The ESENT error was: -583." error in the event logs.
Checking the System32\Catroot2 directory there was a dberr.txt file containing lots of JET and other errors. The database files seemed to be missing under the {F...some-guid} folder.
The problem is something to do with Windows not understanding the "Advanced Format" of the new disc - something to do with 4096 rather than 512 byte sectors.
Using the Microsoft fsutil tool confirms this. [Try googling "Microsoft Advanced Format Support" or something similar - there's a patch that you need to get installed that includes this tool and allegedly Windows support. Since Windows Update isn't working, it errors when you try to install it. You need to use 7-zip to grab the CAB file from the archive and then install that manually (somehow - google!).]
Try "fsutil fsinfo ntfsinfo c:" in an elevated command prompt and you'll see:
The Bytes Per Physical Sector will be "not supported".
Now you need to get a suitable driver. There doesn't seem to be a correct one labelled for the W500, but one that works is in a package which lists the W510 as supported.
Look for:
(Used Windows Backup and Restore to create a System Image, then replaced the hard disk, then restored. Tried various other copy-tools but they wouldn't work via the SATA interface plugged into my USB socket. Note that Windows *did not* get the hard-drive alignment correct when it did the restore. I checked the alignment using a tool called AS SSD Benchmark, then fixed it using the MiniTool Partition Wizard.)
All seemed to be running well enough, but Windows Update wouldn't work and the underlying problem was the "The Cryptographic Services service failed to initialize the Catalog Database. The ESENT error was: -583." error in the event logs.
Checking the System32\Catroot2 directory there was a dberr.txt file containing lots of JET and other errors. The database files seemed to be missing under the {F...some-guid} folder.
The problem is something to do with Windows not understanding the "Advanced Format" of the new disc - something to do with 4096 rather than 512 byte sectors.
Using the Microsoft fsutil tool confirms this. [Try googling "Microsoft Advanced Format Support" or something similar - there's a patch that you need to get installed that includes this tool and allegedly Windows support. Since Windows Update isn't working, it errors when you try to install it. You need to use 7-zip to grab the CAB file from the archive and then install that manually (somehow - google!).]
Try "fsutil fsinfo ntfsinfo c:" in an elevated command prompt and you'll see:
The Bytes Per Physical Sector will be "not supported".
Now you need to get a suitable driver. There doesn't seem to be a correct one labelled for the W500, but one that works is in a package which lists the W510 as supported.
Look for:
| Intel Rapid Storage Technology Driver g1io15ww.exe 581.62 KB | Windows 7 64bit, Windows Vista 64bit, Windows XP | 11.2.0.1006 | 28 Mar 2013 |
on the Lenovo site.
Run and extract that, and then go to Device manager and update the driver for the
IDE ATA/ATAPI Controllers -> Intel(R) ICH9M-E/M SATA AHCI Controller device - browsing to the directory that you just extracted all those files to. (It'll pick up the file automatically.)
Before you reboot, you might as well stop the Cryptographic Service and rename the System32\Catroot2 directory.
After you reboot, you should see that this directory gets rebuilt and log files appear and disappear as that's happening. [Other posts mention this taking an hour, but that's probably on a standard HD. On the SSD, it took about 5 minutes.]
The fsutil command should now give you 4096 instead of "not supported".
Try Windows Update again!
Wednesday, 13 November 2013
How does the Sharepoint 2010 Client Side Object Model do its Optimistic Concurrency checking...
or "How can you check if a list item has been changed since you retrieved it?"
[Anyone who said to use the "Modified" date, go wash your mouth out!]
I'm pulling items out of lists in a WEB API service app and supplying the data to a client app in a custom format.
The client might pass data back requesting updates - but before I use the CSOM to perform the update I want to make sure that no-one else has updated the list-item in the meantime.
So bascically I want the equivalent of a Hibernate / nHibernate version property to pass / return / check over the wire.
Within your list-item you'll find the hidden field owshiddenversion . That's the one whose value increments every time the list item is change.
[Anyone who said to use the "Modified" date, go wash your mouth out!]
I'm pulling items out of lists in a WEB API service app and supplying the data to a client app in a custom format.
The client might pass data back requesting updates - but before I use the CSOM to perform the update I want to make sure that no-one else has updated the list-item in the meantime.
So bascically I want the equivalent of a Hibernate / nHibernate version property to pass / return / check over the wire.
Within your list-item you'll find the hidden field owshiddenversion . That's the one whose value increments every time the list item is change.
Monday, 3 December 2012
Weird cause of Msg 3989 / "New request is not allowed to start because it should come with valid transaction descriptor"
Running a query against SQL Server 2008 R2 using SQL Server Management Studio (or wot I sometimes and apparently-mistakenly call Enterprise Manager), I got back the error...
Msg 3989, Level 16, State 1, Line 1
New request is not allowed to start because it should come with valid transaction descriptor
This was a slightly tricky query I'd been building up and it used a table-value function (i.e. a user-defined function that returns a table type) which ran against a Linked Server's tables, joining that to local tables.
A quick google gave many hits about ADO.Net pooling and suggestions to upgrade things to latest service-packs. In my case though this wasn't the problem.
All I needed to do was fix the table-value function, which was throwing a datatype-conversion error. (I'd made a quick amendment and hadn't tested it outside the bigger query.)
Msg 3989, Level 16, State 1, Line 1
New request is not allowed to start because it should come with valid transaction descriptor
This was a slightly tricky query I'd been building up and it used a table-value function (i.e. a user-defined function that returns a table type) which ran against a Linked Server's tables, joining that to local tables.
A quick google gave many hits about ADO.Net pooling and suggestions to upgrade things to latest service-packs. In my case though this wasn't the problem.
All I needed to do was fix the table-value function, which was throwing a datatype-conversion error. (I'd made a quick amendment and hadn't tested it outside the bigger query.)
Friday, 10 August 2012
Quiet pump for a Biorb
Or not.
If anybody's wife gets themselves a Biorb (60, in this case) and sticks it in the living room, and then anybody thinks that they can sort out the well-I-wouldn't-get-away-with-this unreasonable racket made by the external air pump by suggesting they replace the pump with a slightly better specced "silent" pump like the Tetratec APS150..... well, don't.
It might possibly be a different pitch, but it still makes equal noise and vibration.
Might try a (slightly-less-well-specced) Eheim when the embarrassment of the first failure has subsided...
UPDATE: 2013-11-13.
Eheim 3701. Wahey! Slightly less powerful, but much quieter than either the original or the Tetratec.
If anybody's wife gets themselves a Biorb (60, in this case) and sticks it in the living room, and then anybody thinks that they can sort out the well-I-wouldn't-get-away-with-this unreasonable racket made by the external air pump by suggesting they replace the pump with a slightly better specced "silent" pump like the Tetratec APS150..... well, don't.
It might possibly be a different pitch, but it still makes equal noise and vibration.
Might try a (slightly-less-well-specced) Eheim when the embarrassment of the first failure has subsided...
UPDATE: 2013-11-13.
Eheim 3701. Wahey! Slightly less powerful, but much quieter than either the original or the Tetratec.
Wednesday, 23 May 2012
Now IE9 hangs, now it doesn't.
IE9 fires up, I open a couple of pages in separate tabs (BBC News or something), then after a minute or two it hangs (as if it's "Not Responding", but it's not labelled as such in the Task Manager).
To compound the misery, it freezes the mouse-pointer when it hangs. (It's okay: I like my keyboard navigation anyway - and that still works for kicking round Windows and other apps.) Kill the iexplore.exe processes to get back to normal operation...
Anyway, looks like the solution is to hit the "Advanced" tab on your Internet Options (before the browser hangs, naturally!) and "Use Software Rendering instead of GPU Rendering".
Restart IE, and no more crashes for me!
Windows 7 64-bit, 32-bit IE9, Lenovo Thinkpad T500.
To compound the misery, it freezes the mouse-pointer when it hangs. (It's okay: I like my keyboard navigation anyway - and that still works for kicking round Windows and other apps.) Kill the iexplore.exe processes to get back to normal operation...
Anyway, looks like the solution is to hit the "Advanced" tab on your Internet Options (before the browser hangs, naturally!) and "Use Software Rendering instead of GPU Rendering".
Restart IE, and no more crashes for me!
Windows 7 64-bit, 32-bit IE9, Lenovo Thinkpad T500.
Sunday, 15 April 2012
WaveMaker 6.4.5GA
Having recently installed Fedora to have a go at this, I'd downloaded the rpm for WaveMaker 6.4.5.
I figured I'd installed it, and things were going well enough except that I was getting a 404 resource cannot be found error for the ConfigurationTool webapp. (The /ConfigurationTool path is configured to point to the studioConfig directory in /opt/wavemaker-6.4.5GA - though it seems you can only see this if you check the Catalina config in /tmp/WaveMakerXXXXX when you've started WaveMaker up.)
Anyway, I downloaded and installed the rpm for 6.4.4 and that studioConfig directory has *way* more files in it. Problem solved for me.
(Haven't reported this to the WaveMaker people because I'm not sure it wasn't my rpm download or install problem. I've been doing this over a couple of days and I haven't used Linux in several years...)
Subscribe to:
Posts (Atom)