Importing / Indexing MySQL data into Solr

Apache Solr is a fast, full featured, open-source Java search server. It enables you to easily create search engines which index, search & analyze data from websites, databases or files.

Before we proceed further I presume that you have already configured Solr server without data or refer to Solr in 5 minutes tutorial to configure your Solr server first.

Configure your Solr server
Step 1:
To index your data firstly you need to define schema by editing file called schema.xml present at <SOLR_HOME>/example/solr/conf/ Schema.xml in solr serves the similar purpose that table does in mysql
In schema.xml file you have to define the
Fields with there field typeField which should be used as unique keyWhich fields are required, indexedDefault search field (deprecated in new versions)Default search operator (AND | OR deprecated in new versions)**indexed fields are fields which undergo an analysis phase, and are added to the index.
Search for <fields> tag and define your fields und…

Google: Sign-in attempt prevented while using STMP

Oflate if you are facing authentication issues while sending your emails via google STMP connection and getting emails like

Subject: Sign-in attempt prevented

Hi,Someone just tried to sign in to your Google Account from an app that doesn't meet modern security standards.
Thursday, January 21, 2016 12:17 PM (Eastern Standard Time)
Bridgeport, CT, USA* We strongly recommend that you use a secure app, like Gmail, to access your account. All apps made by Google meet these security standards. Using a less secure app, on the other hand, could leave your account vulnerable. Learn more.
Use this setting to make is accessible

Changing your YouTube video preview thumbnail

To change preview thumbnail of your youtube video

Option 1

You can choose a thumbnail from the three options that youtube automatically generates 

Go to Video Manager by clicking on your username in the upper right corner.On the My Videos/Upload Page, click Edit for the corresponding video you'd like to change.Once you are on Edit Video Page you can choose from the three options provided by YouTube as highlighted in the screen grab below.
Option 2
If don't find any image suitable for your video in the options provided by YouTube then you can also add a "Custom Thumbnail" for your video. Please note you will be able to see this option only if your YouTube account is a verified account.
If you are already viewing the Custom Thumbnail option you can simply upload a image of your choice and set it as your video preview thumbnail.
P.S. I would recommend to keep 16:9 ratio as it's the most used in YouTube Players and previews
Once you have selected the preview image of you…

Making PDF files SEO friendly

Are you trying to figure out a way to get search engines to drill down your online PDF files and improve its ranking? If that is the case then you have a reason to cheer up :), this post will guide you to follow few very basic steps to improve your PDFs online visibility.Best Practices in SEO for PDF filesSmartly name your PDFs - Typically, the PDF filename will become part of the URL, so give your document a good key-word rich filename. Set the PDF title - Yes, most of us just don't set PDF title properties, but the matter of fact is that the title tag is a huge ranking factor. To set title of a PDF file, open it in Adobe Acrobat or any other PDF creator and go to, File --> Properties Set the other document properties too - don't just ignore the other properties provide a good Subject (Description) and Keywords as you do it for your HTMLsPrefer text-based PDFs over image-dominated PDFsSet "alt" text for all the images - this will also increase the accessibilityTou…

Custom PagingNavigator for SEO friendly URL

Apache Wickets biggest strength is its focus on components - Among a very large set of components is PagingNavigator component. It is a Wicket Panel component to draw and maintain a complete page navigation. I found this component very useful but the only problem that compelled me to write my own CustomPagingNavigator is the wicket URLs that are being created by clicking the page links. 

The Java Part...
public class CustomPaginationLinksPanel<T> extends Panel{
private static final long serialVersionUID = 10002L;
/**Pageable List View to be displayed */
private PageableListView<T> mainView;
/** Max count of links  default  value = 5 */
private intlinksPerPage = 5;
/** Page Number currently visible */
private int currPgNum;
    /** first page number */
private intfirstNum;
/** last page number */
private intlastNum;
//Calculated on the basic of List size
private intmaxPages;
//Parameter name that will be displayed as a part of URL
private String PAGINATOR_PARAM_NAME = "pg";